Class LiteNetConsoleServer
Inheritance
LiteNetConsoleServer
Implements
INetEventListener
IDisposable
Assembly: cs.temp.dll.dll
Syntax
public class LiteNetConsoleServer : IConsoleServer
Constructors
LiteNetConsoleServer(ICredentialsValidator, ServerSettings)
Declaration
public LiteNetConsoleServer(ICredentialsValidator validator, ServerSettings settings)
Parameters
Properties
ConnectedClientsCount
Declaration
public int ConnectedClientsCount { get; }
Property Value
ConnectedClientSenders
Declaration
public IReadOnlyCollection<ICommandSender> ConnectedClientSenders { get; }
Property Value
Port
Declaration
public ushort Port { get; }
Property Value
Methods
Dispose()
Declaration
OnConnectionRequest(ConnectionRequest)
Declaration
public void OnConnectionRequest(ConnectionRequest request)
Parameters
Type |
Name |
Description |
ConnectionRequest |
request |
|
OnNetworkError(IPEndPoint, SocketError)
Declaration
public void OnNetworkError(IPEndPoint endPoint, SocketError socketError)
Parameters
Type |
Name |
Description |
IPEndPoint |
endPoint |
|
SocketError |
socketError |
|
OnNetworkLatencyUpdate(NetPeer, Int32)
Declaration
public void OnNetworkLatencyUpdate(NetPeer peer, int latency)
Parameters
Type |
Name |
Description |
NetPeer |
peer |
|
Int32 |
latency |
|
OnNetworkReceive(NetPeer, NetPacketReader, DeliveryMethod)
Declaration
public void OnNetworkReceive(NetPeer peer, NetPacketReader reader, DeliveryMethod deliveryMethod)
Parameters
Type |
Name |
Description |
NetPeer |
peer |
|
NetPacketReader |
reader |
|
DeliveryMethod |
deliveryMethod |
|
OnNetworkReceiveUnconnected(IPEndPoint, NetPacketReader, UnconnectedMessageType)
Declaration
public void OnNetworkReceiveUnconnected(IPEndPoint remoteEndPoint, NetPacketReader reader, UnconnectedMessageType messageType)
Parameters
Type |
Name |
Description |
IPEndPoint |
remoteEndPoint |
|
NetPacketReader |
reader |
|
UnconnectedMessageType |
messageType |
|
OnPeerConnected(NetPeer)
Declaration
public void OnPeerConnected(NetPeer peer)
Parameters
Type |
Name |
Description |
NetPeer |
peer |
|
OnPeerDisconnected(NetPeer, DisconnectInfo)
Declaration
public void OnPeerDisconnected(NetPeer peer, DisconnectInfo disconnectInfo)
Parameters
Type |
Name |
Description |
NetPeer |
peer |
|
DisconnectInfo |
disconnectInfo |
|
SendLogToAllClients(String, LogType)
Declaration
public void SendLogToAllClients(string message, LogType logType = LogType.DEFAULT)
Parameters
Start(UInt16, Boolean)
Declaration
public bool Start(ushort port, bool broadcastReceiveEnabled = true)
Parameters
Type |
Name |
Description |
UInt16 |
port |
|
Boolean |
broadcastReceiveEnabled |
|
Returns
Update()
Declaration
Events
OnCommandSenderConnectedEvent
Declaration
public event Action<ICommandSender> OnCommandSenderConnectedEvent
Event Type
OnCommandSenderDisconnectedEvent
Declaration
public event Action<ICommandSender> OnCommandSenderDisconnectedEvent
Event Type
OnCommandStringReceivedEvent
Declaration
public event Action<string, ICommandSender> OnCommandStringReceivedEvent
Event Type
Implements
INetEventListener
IDisposable