Class FiveM
FiveM Protocol (https://docs.fivem.net/docs/server-manual/proxy-setup/)
public class FiveM : ProtocolBase
- Inheritance
-
FiveM
- Inherited Members
Constructors
FiveM(string, int, int)
Initializes a new instance of the FiveM class.
public FiveM(string host, int port, int timeout = 5000)
Parameters
host
stringThe host to connect to.
port
intThe port to connect to.
timeout
intThe connection timeout in milliseconds. Default is 5 seconds.
Properties
FullName
Gets the full name of the protocol.
public override string FullName { get; }
Property Value
Methods
GetDynamic()
Asynchronously gets dynamic information from the server.
public Task<Dictionary<string, JsonElement>> GetDynamic()
Returns
- Task<Dictionary<string, JsonElement>>
A task that represents the asynchronous operation. The task result contains the dynamic information.
GetInfo()
Asynchronously gets information about the server.
public Task<Dictionary<string, JsonElement>> GetInfo()
Returns
- Task<Dictionary<string, JsonElement>>
A task that represents the asynchronous operation. The task result contains the server information.
GetPlayers()
Asynchronously gets the list of players from the server.
public Task<List<JsonElement>> GetPlayers()
Returns
- Task<List<JsonElement>>
A task that represents the asynchronous operation. The task result contains the list of players.