C# Класс LiteNetLib.NetServer

Наследование: NetBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
PostProcessEvent ( int deltaTime ) : void
ProcessReceiveError ( int socketErrorCode ) : void
ReceiveFromSocket ( byte reusableBuffer, int count, NetEndPoint remoteEndPoint ) : void

Приватные методы

Метод Описание
ClearPeers ( ) : void
ProcessSendError ( NetEndPoint remoteEndPoint, int socketErrorCode ) : void
ReceiveFromPeer ( NetPacket packet, NetEndPoint remoteEndPoint ) : void
RemovePeer ( NetPeer peer ) : void
SendConnectAccept ( NetPeer peer, ulong id ) : void

Описание методов

DisconnectPeer() публичный Метод

Disconnect peer from server
public DisconnectPeer ( NetPeer peer ) : void
peer NetPeer peer to disconnect
Результат void

GetPeers() публичный Метод

Get copy of current connected peers
public GetPeers ( ) : LiteNetLib.NetPeer[]
Результат LiteNetLib.NetPeer[]

NetServer() публичный Метод

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
Результат System

PostProcessEvent() защищенный Метод

protected PostProcessEvent ( int deltaTime ) : void
deltaTime int
Результат void

ProcessReceiveError() защищенный Метод

protected ProcessReceiveError ( int socketErrorCode ) : void
socketErrorCode int
Результат void

ReceiveFromSocket() защищенный Метод

protected ReceiveFromSocket ( byte reusableBuffer, int count, NetEndPoint remoteEndPoint ) : void
reusableBuffer byte
count int
remoteEndPoint NetEndPoint
Результат void

SendToClients() публичный Метод

public SendToClients ( NetDataWriter writer, SendOptions options ) : void
writer LiteNetLib.Utils.NetDataWriter
options SendOptions
Результат void

SendToClients() публичный Метод

public SendToClients ( NetDataWriter writer, SendOptions options, NetPeer excludePeer ) : void
writer LiteNetLib.Utils.NetDataWriter
options SendOptions
excludePeer NetPeer
Результат void

SendToClients() публичный Метод

public SendToClients ( byte data, SendOptions options ) : void
data byte
options SendOptions
Результат void

SendToClients() публичный Метод

public SendToClients ( byte data, SendOptions options, NetPeer excludePeer ) : void
data byte
options SendOptions
excludePeer NetPeer
Результат void

SendToClients() публичный Метод

public SendToClients ( byte data, int start, int length, SendOptions options ) : void
data byte
start int
length int
options SendOptions
Результат void

SendToClients() публичный Метод

public SendToClients ( byte data, int start, int length, SendOptions options, NetPeer excludePeer ) : void
data byte
start int
length int
options SendOptions
excludePeer NetPeer
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void