Class Battlefield
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
hoststringThe host to connect to.
portintThe port to connect to.
timeoutintThe timeout for the connection.
Properties
FullName
Gets the full name of the protocol.
public override string FullName { get; }
Property Value
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.