Show / Hide Table of Contents

Class Client<TPlayer>

Representation of a client connected to the server

Inheritance
object
Client<TPlayer>
Client
Implements
IClient<TPlayer>
IClient
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Clients
Assembly: SlipeServer.Server.dll
Syntax
public class Client<TPlayer> : IClient<TPlayer>, IClient where TPlayer : Player
Type Parameters
Name Description
TPlayer

Constructors

| Edit this page View Source

Client(ulong, INetWrapper, TPlayer)

Creates a client

Declaration
public Client(ulong binaryAddress, INetWrapper netWrapper, TPlayer player)
Parameters
Type Name Description
ulong binaryAddress

The identifier using within the networking interface for the client

INetWrapper netWrapper

The networking interface the client is connected to

TPlayer player

The player this client is associated with

Properties

| Edit this page View Source

ConnectionState

The client's current connection state, indicating where in the connection process the client currently is

Declaration
public ClientConnectionState ConnectionState { get; protected set; }
Property Value
Type Description
ClientConnectionState
| Edit this page View Source

Extra

Player's extra data (data received durring connection), this can be null early on in the connection process

Declaration
public string? Extra { get; }
Property Value
Type Description
string
| Edit this page View Source

IPAddress

Players IP Address, this can be null early on in the connection process

Declaration
public IPAddress? IPAddress { get; set; }
Property Value
Type Description
IPAddress
| Edit this page View Source

IsConnected

Indicates whether or not the client is currently connected

Declaration
public bool IsConnected { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Ping

The client's most recent ping

Declaration
public uint Ping { get; set; }
Property Value
Type Description
uint
| Edit this page View Source

Player

Declaration
protected TPlayer Player { get; set; }
Property Value
Type Description
TPlayer
| Edit this page View Source

Serial

Player serial, this can be null early on in the connection process

Declaration
public string? Serial { get; }
Property Value
Type Description
string
| Edit this page View Source

Version

Player's MTA version, this can be null early on in the connection process

Declaration
public string? Version { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

FetchIp()

Fetches the client's IP address

Declaration
public void FetchIp()
| Edit this page View Source

FetchSerial()

Fetches the client's serial and MTA version

Declaration
public void FetchSerial()
| Edit this page View Source

ResendModPackets()

Requests the client to re-send mod information packets

Declaration
public void ResendModPackets()
| Edit this page View Source

ResendPlayerACInfo()

Requests the client to re-send anti cheat information packets.

Declaration
public void ResendPlayerACInfo()
| Edit this page View Source

ResetConnectionState()

Resets a client's connection state, allowing the client to be re-used for a new connection

Declaration
public void ResetConnectionState()
| Edit this page View Source

SendPacket(PacketId, byte[], PacketPriority, PacketReliability)

Sends a single packet to the client

Declaration
public void SendPacket(PacketId packetId, byte[] data, PacketPriority priority = PacketPriority.Medium, PacketReliability reliability = PacketReliability.Unreliable)
Parameters
Type Name Description
PacketId packetId
byte[] data
PacketPriority priority
PacketReliability reliability
| Edit this page View Source

SendPacket(Packet)

Sends a single packet to the client

Declaration
public void SendPacket(Packet packet)
Parameters
Type Name Description
Packet packet
| Edit this page View Source

SetDisconnected()

Sets a client's connection state to be Quit

Declaration
public void SetDisconnected()
| Edit this page View Source

SetVersion(ushort)

Sets the client's bitstream version

Declaration
public void SetVersion(ushort version)
Parameters
Type Name Description
ushort version

Implements

IClient<TPlayer>
IClient
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX