NetManager Methods
From LiteNetLib
NetManager Methods |
LiteNetLib |
The NetManager type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| AddFlowMode | ||
| Connect(NetEndPoint) |
Connect to remote host
| |
| Connect(String, Int32) |
Connect to remote host
| |
| DisconnectPeer(NetPeer) |
Disconnect peer from server
| |
| DisconnectPeer(NetPeer, NetDataWriter) |
Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
| |
| DisconnectPeer(NetPeer, Byte) |
Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
| |
| DisconnectPeer(NetPeer, Byte, Int32, Int32) |
Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
| |
| Flush |
Flush all queued packets of all peers
| |
| GetFirstPeer |
Get first peer. Usefull for Client mode
| |
| GetPeers |
Get copy of current connected peers
| |
| GetPeersNonAlloc |
Get copy of current connected peers (without allocations)
| |
| PollEvents |
Receive all pending events. Call this in game update code
| |
| SendDiscoveryRequest(Byte, Int32) | ||
| SendDiscoveryRequest(NetDataWriter, Int32) | ||
| SendDiscoveryRequest(Byte, Int32, Int32, Int32) | ||
| SendDiscoveryResponse(Byte, NetEndPoint) | ||
| SendDiscoveryResponse(NetDataWriter, NetEndPoint) | ||
| SendDiscoveryResponse(Byte, Int32, Int32, NetEndPoint) | ||
| SendToAll(Byte, SendOptions) |
Send data to all connected peers
| |
| SendToAll(NetDataWriter, SendOptions) |
Send data to all connected peers
| |
| SendToAll(Byte, SendOptions, NetPeer) |
Send data to all connected peers
| |
| SendToAll(NetDataWriter, SendOptions, NetPeer) |
Send data to all connected peers
| |
| SendToAll(Byte, Int32, Int32, SendOptions) |
Send data to all connected peers
| |
| SendToAll(Byte, Int32, Int32, SendOptions, NetPeer) |
Send data to all connected peers
| |
| SendUnconnectedMessage(Byte, NetEndPoint) |
Send message without connection
| |
| SendUnconnectedMessage(NetDataWriter, NetEndPoint) |
Send message without connection
| |
| SendUnconnectedMessage(Byte, Int32, Int32, NetEndPoint) |
Send message without connection
| |
| Start |
Start logic thread and listening on available port
| |
| Start(Int32) |
Start logic thread and listening on selected port
| |
| Stop |
Force closes connection and stop all threads.
|
See Also