Table of Contents

Class Battlefield

Namespace
OpenGSQ.Protocols
Assembly
OpenGSQ.dll

Battlefield Protocol

public class Battlefield : ProtocolBase
Inheritance
Battlefield
Inherited Members

Constructors

Battlefield(string, int, int)

Initializes a new instance of the Battlefield class.

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

Parameters

host string

The host to connect to.

port int

The port to connect to.

timeout int

The timeout for the connection.

Properties

FullName

Gets the full name of the protocol.

public override string FullName { get; }

Property Value

string

Methods

GetInfo()

Retrieves the information about the game.

public Task<Info> GetInfo()

Returns

Task<Info>

A task that represents the asynchronous operation. The task result contains the information about the game.

Exceptions

TimeoutException

Thrown when the operation times out.

GetPlayers()

Gets the players on the server.

public Task<List<Dictionary<string, string>>> GetPlayers()

Returns

Task<List<Dictionary<string, string>>>

A list of dictionaries containing player information.

Exceptions

TimeoutException

Thrown when the operation times out.

GetVersion()

Retrieves the version information of the game mod.

public Task<VersionInfo> GetVersion()

Returns

Task<VersionInfo>

A task that represents the asynchronous operation. The task result contains the version information of the game mod.

Exceptions

TimeoutException

Thrown when the operation times out.