NetManager Methods

LiteNetLib

NetManager Methods

LiteNetLib

The NetManager type exposes the following members.

Methods

  NameDescription
Public methodAddFlowMode
Public methodConnect(NetEndPoint)
Connect to remote host
Public methodConnect(String, Int32)
Connect to remote host
Public methodDisconnectPeer(NetPeer)
Disconnect peer from server
Public methodDisconnectPeer(NetPeer, NetDataWriter)
Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
Public methodDisconnectPeer(NetPeer, Byte)
Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
Public methodDisconnectPeer(NetPeer, Byte, Int32, Int32)
Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
Public methodFlush
Flush all queued packets of all peers
Public methodGetFirstPeer
Get first peer. Usefull for Client mode
Public methodGetPeers
Get copy of current connected peers
Public methodGetPeersNonAlloc
Get copy of current connected peers (without allocations)
Public methodPollEvents
Receive all pending events. Call this in game update code
Public methodSendDiscoveryRequest(Byte, Int32)
Public methodSendDiscoveryRequest(NetDataWriter, Int32)
Public methodSendDiscoveryRequest(Byte, Int32, Int32, Int32)
Public methodSendDiscoveryResponse(Byte, NetEndPoint)
Public methodSendDiscoveryResponse(NetDataWriter, NetEndPoint)
Public methodSendDiscoveryResponse(Byte, Int32, Int32, NetEndPoint)
Public methodSendToAll(Byte, SendOptions)
Send data to all connected peers
Public methodSendToAll(NetDataWriter, SendOptions)
Send data to all connected peers
Public methodSendToAll(Byte, SendOptions, NetPeer)
Send data to all connected peers
Public methodSendToAll(NetDataWriter, SendOptions, NetPeer)
Send data to all connected peers
Public methodSendToAll(Byte, Int32, Int32, SendOptions)
Send data to all connected peers
Public methodSendToAll(Byte, Int32, Int32, SendOptions, NetPeer)
Send data to all connected peers
Public methodSendUnconnectedMessage(Byte, NetEndPoint)
Send message without connection
Public methodSendUnconnectedMessage(NetDataWriter, NetEndPoint)
Send message without connection
Public methodSendUnconnectedMessage(Byte, Int32, Int32, NetEndPoint)
Send message without connection
Public methodStart
Start logic thread and listening on available port
Public methodStart(Int32)
Start logic thread and listening on selected port
Public methodStop
Force closes connection and stop all threads.
Top
See Also

Reference