Table of Contents

Class Samp

Namespace
OpenGSQ.Protocols
Assembly
OpenGSQ.dll

San Andreas Multiplayer Protocol

public class Samp : Vcmp
Inheritance
Samp
Inherited Members

Constructors

Samp(string, int, int)

Initializes a new instance of the Samp class.

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

Parameters

host string

The host 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

GetPlayers()

Asynchronously gets the list of players from the server.

public Task<List<Player>> GetPlayers()

Returns

Task<List<Player>>

A task that represents the asynchronous operation. The task result contains a list of Player objects.

Exceptions

TimeoutException

Thrown when the operation times out.

GetRules()

Asynchronously gets the rules.

public Task<Dictionary<string, string>> GetRules()

Returns

Task<Dictionary<string, string>>

A task that represents the asynchronous operation. The task result contains a dictionary of rules.

Exceptions

TimeoutException

Thrown when the operation times out.

GetStatus()

Asynchronously gets the status of the server.

public Task<Status> GetStatus()

Returns

Task<Status>

A task that represents the asynchronous operation. The task result contains a StatusResponse object with the server status.

Exceptions

TimeoutException

Thrown when the operation times out.