Table of Contents

Class GameSpy2

Namespace
OpenGSQ.Protocols
Assembly
OpenGSQ.dll

Gamespy Query Protocol version 2

public class GameSpy2 : ProtocolBase
Inheritance
GameSpy2
Inherited Members

Constructors

GameSpy2(string, int, int)

Initializes a new instance of the GameSpy2 class.

public GameSpy2(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(RequestHeader)

Retrieves information about the server including Info, Players, and Teams.

public Task<Status> GetStatus(GameSpy2.RequestHeader requestHeader = RequestHeader.Info | RequestHeader.Players | RequestHeader.Teams)

Parameters

requestHeader GameSpy2.RequestHeader

The type of information to request.

Returns

Task<Status>

A Status object containing the requested information.

Exceptions

TimeoutException

Thrown when the operation times out.