C# Class LiteNetLib.NetServer

Inheritance: NetBase
Afficher le fichier Open project: RevenantX/LiteNetLib Class Usage Examples

Méthodes publiques

Méthode Description
DisconnectPeer ( NetPeer peer ) : void

Disconnect peer from server

GetPeers ( ) : LiteNetLib.NetPeer[]

Get copy of current connected peers

NetServer ( INetEventListener listener, int maxClients, string key ) : System

Creates server object

SendToClients ( NetDataWriter writer, SendOptions options ) : void
SendToClients ( NetDataWriter writer, SendOptions options, NetPeer excludePeer ) : void
SendToClients ( byte data, SendOptions options ) : void
SendToClients ( byte data, SendOptions options, NetPeer excludePeer ) : void
SendToClients ( byte data, int start, int length, SendOptions options ) : void
SendToClients ( byte data, int start, int length, SendOptions options, NetPeer excludePeer ) : void
Stop ( ) : void

Méthodes protégées

Méthode Description
PostProcessEvent ( int deltaTime ) : void
ProcessReceiveError ( int socketErrorCode ) : void
ReceiveFromSocket ( byte reusableBuffer, int count, NetEndPoint remoteEndPoint ) : void

Private Methods

Méthode Description
ClearPeers ( ) : void
ProcessSendError ( NetEndPoint remoteEndPoint, int socketErrorCode ) : void
ReceiveFromPeer ( NetPacket packet, NetEndPoint remoteEndPoint ) : void
RemovePeer ( NetPeer peer ) : void
SendConnectAccept ( NetPeer peer, ulong id ) : void

Method Details

DisconnectPeer() public méthode

Disconnect peer from server
public DisconnectPeer ( NetPeer peer ) : void
peer NetPeer peer to disconnect
Résultat void

GetPeers() public méthode

Get copy of current connected peers
public GetPeers ( ) : LiteNetLib.NetPeer[]
Résultat LiteNetLib.NetPeer[]

NetServer() public méthode

Creates server object
public NetServer ( INetEventListener listener, int maxClients, string key ) : System
listener INetEventListener Listener of server events
maxClients int Maximum clients
key string Application key to identify connecting clients
Résultat System

PostProcessEvent() protected méthode

protected PostProcessEvent ( int deltaTime ) : void
deltaTime int
Résultat void

ProcessReceiveError() protected méthode

protected ProcessReceiveError ( int socketErrorCode ) : void
socketErrorCode int
Résultat void

ReceiveFromSocket() protected méthode

protected ReceiveFromSocket ( byte reusableBuffer, int count, NetEndPoint remoteEndPoint ) : void
reusableBuffer byte
count int
remoteEndPoint NetEndPoint
Résultat void

SendToClients() public méthode

public SendToClients ( NetDataWriter writer, SendOptions options ) : void
writer LiteNetLib.Utils.NetDataWriter
options SendOptions
Résultat void

SendToClients() public méthode

public SendToClients ( NetDataWriter writer, SendOptions options, NetPeer excludePeer ) : void
writer LiteNetLib.Utils.NetDataWriter
options SendOptions
excludePeer NetPeer
Résultat void

SendToClients() public méthode

public SendToClients ( byte data, SendOptions options ) : void
data byte
options SendOptions
Résultat void

SendToClients() public méthode

public SendToClients ( byte data, SendOptions options, NetPeer excludePeer ) : void
data byte
options SendOptions
excludePeer NetPeer
Résultat void

SendToClients() public méthode

public SendToClients ( byte data, int start, int length, SendOptions options ) : void
data byte
start int
length int
options SendOptions
Résultat void

SendToClients() public méthode

public SendToClients ( byte data, int start, int length, SendOptions options, NetPeer excludePeer ) : void
data byte
start int
length int
options SendOptions
excludePeer NetPeer
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void