Click or drag to resize

LiteNetManager Methods

The LiteNetManager type exposes the following members.

Methods
 NameDescription
Protected methodAddPeerToSet 
Public methodConnect(IPEndPoint, NetDataWriter) Connect to remote host
Public methodConnect(IPEndPoint, ReadOnlySpanByte) Connect to remote host
Public methodConnect(IPEndPoint, String) Connect to remote host
Public methodConnect(String, Int32, NetDataWriter) Connect to remote host
Public methodConnect(String, Int32, String) Connect to remote host
Protected methodContainsPeer 
Protected methodCreateConnectionRequest 
Protected methodCreateIncomingPeer 
Protected methodCreateOutgoingPeer 
Protected methodCreateRejectPeer 
Public methodDisconnectAll Disconnect all peers without any additional data
Public methodDisconnectAll(Byte, Int32, Int32) Disconnect all peers with shutdown message
Public methodDisconnectPeer(LiteNetPeer) Disconnect peer from server
Public methodDisconnectPeer(LiteNetPeer, NetDataWriter) Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
Public methodDisconnectPeer(LiteNetPeer, Byte) Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
Public methodDisconnectPeer(LiteNetPeer, Byte, Int32, Int32) Disconnect peer from server and send additional data (Size must be less or equal MTU - 8)
Public methodDisconnectPeerForce Immediately disconnect peer from server without additional data
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetConnectedPeers Get copy of connected peers (without allocations)
Public methodGetEnumerator 
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetPeerById Gets peer by peer id
Public methodGetPeers Get copy of peers (without allocations)
Public methodGetPeersCount Return peers count with connection state
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodManualUpdate Updates internal peer states, handles timeouts, processes NTP requests and sends buffered packets.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodPollEvents Synchronizes arrived events from the background thread to your main-thread/INetEventListener
Protected methodProcessEvent 
Protected methodProcessNtpRequests 
Protected methodRemovePeerFromSet 
Public methodSendBroadcast(Byte, Int32) 
Public methodSendBroadcast(NetDataWriter, Int32) 
Public methodSendBroadcast(Byte, Int32, Int32, Int32) 
Public methodSendToAll(Byte, DeliveryMethod) Send data to all connected peers (channel - 0)
Public methodSendToAll(NetDataWriter, DeliveryMethod) Send data to all connected peers (channel - 0)
Public methodSendToAll(ReadOnlySpanByte, DeliveryMethod) Send data to all connected peers (channel - 0)
Public methodSendToAll(Byte, DeliveryMethod, LiteNetPeer) Send data to all connected peers (channel - 0)
Public methodSendToAll(NetDataWriter, DeliveryMethod, LiteNetPeer) Send data to all connected peers (channel - 0)
Public methodSendToAll(ReadOnlySpanByte, DeliveryMethod, LiteNetPeer) Send data to all connected peers (channel - 0)
Public methodSendToAll(Byte, Int32, Int32, DeliveryMethod) Send data to all connected peers (channel - 0)
Public methodSendToAll(Byte, Int32, Int32, DeliveryMethod, LiteNetPeer) Send data to all connected peers
Public methodSendUnconnectedMessage(Byte, IPEndPoint) Send message without connection
Public methodSendUnconnectedMessage(NetDataWriter, IPEndPoint) Send message without connection
Public methodSendUnconnectedMessage(ReadOnlySpanByte, IPEndPoint) Send message without connection
Public methodSendUnconnectedMessage(NetDataWriter, String, Int32) Send message without connection. WARNING This method allocates a new IPEndPoint object and synchronously makes a DNS request. If you're calling this method every frame it will be much faster to just cache the IPEndPoint.
Public methodSendUnconnectedMessage(Byte, Int32, Int32, IPEndPoint) 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 methodStart(IPAddress, IPAddress, Int32) Start logic thread and listening on selected port
Public methodStart(String, String, Int32) Start logic thread and listening on selected port
Public methodStart(IPAddress, IPAddress, Int32, Boolean) Start logic thread and listening on selected port
Public methodStartInManualMode(Int32) Start in manual mode and listening on selected port In this mode you should use ManualReceive (without PollEvents) for receive packets and ManualUpdate(...) for update and send packets This mode useful mostly for single-threaded servers
Public methodStartInManualMode(IPAddress, IPAddress, Int32) Start in manual mode and listening on selected port In this mode you should use ManualReceive (without PollEvents) for receive packets and ManualUpdate(...) for update and send packets This mode useful mostly for single-threaded servers
Public methodStartInManualMode(String, String, Int32) Start in manual mode and listening on selected port In this mode you should use ManualReceive (without PollEvents) for receive packets and ManualUpdate(...) for update and send packets This mode useful mostly for single-threaded servers
Public methodStop Force closes connection and stop all threads.
Public methodStop(Boolean) Force closes connection and stop all threads.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTriggerUpdate Triggers update and send logic immediately (works asynchronously)
Public methodTryGetPeerById Gets peer by peer id
Top
Extension Methods
 NameDescription
Public Extension MethodForEachLiteNetPeer
(Defined by RcCollectionExtensions)
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also