Class Quake3
Quake3 Query Protocol
public class Quake3 : Quake2
- Inheritance
-
Quake3
- Inherited Members
Constructors
Quake3(string, int, int)
Initializes a new instance of the Quake3 class.
public Quake3(string host, int port, int timeout = 5000)
Parameters
hoststringThe IP address of the server.
portintThe port number of the server.
timeoutintThe timeout for the connection in milliseconds.
Properties
FullName
Gets the full name of the protocol.
public override string FullName { get; }
Property Value
Methods
GetInfo(bool)
Gets the server information. If stripColor is true, color codes are removed from the server name.
public Task<Dictionary<string, string>> GetInfo(bool stripColor = true)
Parameters
stripColorboolA boolean indicating whether to remove color codes from the server name.
Returns
- Task<Dictionary<string, string>>
A dictionary containing the server information.
Exceptions
- InvalidPacketException
Thrown when the packet header does not match the expected header.
- TimeoutException
Thrown when the operation times out.
GetStatus(bool)
Gets the status of the server including information and players. If stripColor is true, color codes are removed from the server name and player names.
public Task<Status> GetStatus(bool stripColor = true)
Parameters
stripColorboolA boolean indicating whether to remove color codes from the server name and player names.
Returns
Exceptions
- InvalidPacketException
Thrown when the packet header does not match the expected header.
- TimeoutException
Thrown when the operation times out.
StripColor(string)
Removes color codes from a string.
public static string StripColor(string text)
Parameters
textstringThe text to remove color codes from.
Returns
- string
The text with color codes removed.