Table of Contents

Class Quake2

Namespace
OpenGSQ.Protocols
Assembly
OpenGSQ.dll

Quake2 Query Protocol

public class Quake2 : Quake1
Inheritance
Quake2
Derived
Inherited Members

Constructors

Quake2(string, int, int)

Initializes a new instance of the Quake2 class.

public Quake2(string host, int port, int timeout = 5000)

Parameters

host string

The IP address of the server.

port int

The port number of the server.

timeout int

The timeout for the connection in milliseconds.

Properties

FullName

Gets the full name of the protocol.

public override string FullName { get; }

Property Value

string

Methods

GetStatus()

Gets the status of the server including information and players.

public Task<Status> GetStatus()

Returns

Task<Status>

A Status object containing the server information and players.

Exceptions

InvalidPacketException

Thrown when the packet header does not match the expected header.

TimeoutException

Thrown when the operation times out.

ParsePlayers(BinaryReader)

Parses the player information from the BinaryReader.

protected List<Player> ParsePlayers(BinaryReader br)

Parameters

br BinaryReader

The BinaryReader containing the player information.

Returns

List<Player>

A list of Player objects.