LiteNetLib Type of message that you receive in OnNetworkReceiveUnconnected event Disconnect reason that you receive in OnPeerDisconnected event Additional information about disconnection Additional info why peer disconnected Error code (if reason is SocketSendError or SocketReceiveError) Additional data that can be accessed (only if reason is RemoteConnectionClose) New remote peer connected to host, or client connected to remote host Connected peer object Peer disconnected disconnected peer additional info about reason, errorCode or data received with disconnect message Network error (on send or receive) From endPoint (can be null) Socket error code Received some data From peer DataReader containing all received data Type of received packet Received unconnected message From address (IP and Port) Message data Message type (simple, discovery request or responce) Latency information updated Peer with updated latency latency value in milliseconds On peer connection requested Request information (EndPoint, internal id, additional data) Interface to implement for your own logger Static class for defining your own LiteNetLib logger instead of Console.WriteLine or Debug.Log if compiled with UNITY flag Clone NetDataReader without data copy (usable for OnReceive) new NetDataReader instance Creates NetDataWriter from existing ByteArray Source byte array Copy array to new location or use existing Creates NetDataWriter from existing ByteArray (always copied data) Source byte array Offset of array Length of array Register nested property type INetSerializable structure True - if register successful, false - if type already registered Register nested property type True - if register successful, false - if type already registered Register nested property type INetSerializable class True - if register successful, false - if type already registered Reads all available data from NetDataReader and calls OnReceive delegates NetDataReader with packets data Reads all available data from NetDataReader and calls OnReceive delegates NetDataReader with packets data Argument that passed to OnReceivedEvent Reads one packet from NetDataReader and calls OnReceive delegate NetDataReader with packet Reads one packet from NetDataReader and calls OnReceive delegate NetDataReader with packet Argument that passed to OnReceivedEvent Register and subscribe to packet receive event event that will be called when packet deserialized with ReadPacket method Method that constructs packet intead of slow Activator.CreateInstance Register and subscribe to packet receive event (with userData) event that will be called when packet deserialized with ReadPacket method Method that constructs packet intead of slow Activator.CreateInstance Register and subscribe to packet receive event This metod will overwrite last received packet class on receive (less garbage) event that will be called when packet deserialized with ReadPacket method Register and subscribe to packet receive event This metod will overwrite last received packet class on receive (less garbage) event that will be called when packet deserialized with ReadPacket method Register nested property type INetSerializable structure True - if register successful, false - if type already registered Register nested property type INetSerializable class True - if register successful, false - if type already registered Register nested property type True - if register successful, false - if type already registered Reads packet with known type NetDataReader with packet Returns packet if packet in reader is matched type Reads packet with known type (non alloc variant) NetDataReader with packet Deserialization target Returns true if packet in reader is matched type Serialize struct to NetDataWriter (fast) Serialization target NetDataWriter Object to serialize Serialize struct to byte array Object to serialize byte array with serialized data Module for UDP NAT Hole punching operations. Can be accessed from NetManager Sending method type Unreliable. Packets can be dropped, duplicated or arrive without order Reliable. All packets will be sent and received, but without order Unreliable. Packets can be dropped, but never duplicated and arrive in order Reliable and ordered. All packets will be sent and received in order Network constants. Can be tuned from sources for your purposes. Network End Point. Contains ip address and port Main class for all network operations. Can be used as client and/or server. Enable messages receiving without connection. (with SendUnconnectedMessage method) Enable nat punch messages Library logic update and send period in milliseconds Interval for latency detection and checking connection If NetManager doesn't receive any packet from remote peer during this time then connection will be closed (including library internal keepalive packets) Simulate packet loss by dropping random amout of packets. (Works only in DEBUG mode) Simulate latency by holding packets for random time. (Works only in DEBUG mode) Chance of packet loss when simulation enabled. value in percents (1 - 100). Minimum simulated latency Maximum simulated latency Experimental feature. Events automatically will be called without PollEvents method from another thread Allows receive DiscoveryRequests Merge small packets into one before sending to reduce outgoing packets count. (May increase a bit outgoing data size) Delay betwen initial connection attempts Maximum connection attempts before client stops and call disconnect event. Enables socket option "ReuseAddress" for specific purposes Statistics of all connections NatPunchModule for NAT hole punching operations Returns true if socket listening and update thread is running Local EndPoint (host and port) NetManager constructor with maxConnections = 1 (usable for client) Network events listener NetManager constructor Network events listener Maximum connections (incoming and outcoming) Send data to all connected peers DataWriter with data Send options (reliable, unreliable, etc.) Send data to all connected peers Data Send options (reliable, unreliable, etc.) Send data to all connected peers Data Start of data Length of data Send options (reliable, unreliable, etc.) Send data to all connected peers DataWriter with data Send options (reliable, unreliable, etc.) Excluded peer Send data to all connected peers Data Send options (reliable, unreliable, etc.) Excluded peer Send data to all connected peers Data Start of data Length of data Send options (reliable, unreliable, etc.) Excluded peer Start logic thread and listening on available port Start logic thread and listening on selected port bind to specific ipv4 address bind to specific ipv6 address port to listen Start logic thread and listening on selected port port to listen Send message without connection Raw data Packet destination Operation result Send message without connection Data serializer Packet destination Operation result Send message without connection Raw data data start data length Packet destination Operation result Flush all queued packets of all peers Receive all pending events. Call this in game update code Connect to remote host Server IP or hostname Server Port Connection key Null if connections limit reached, New NetPeer if new connection, Old NetPeer if already connected Connect to remote host Server IP or hostname Server Port Additional data for remote peer Null if connections limit reached, New NetPeer if new connection, Old NetPeer if already connected Connect to remote host Server end point (ip and port) Connection key Null if connections limit reached, New NetPeer if new connection, Old NetPeer if already connected Connect to remote host Server end point (ip and port) Additional data for remote peer Null if connections limit reached, New NetPeer if new connection, Old NetPeer if already connected Force closes connection and stop all threads. Get first peer. Usefull for Client mode Get copy of current connected peers (slow! use GetPeersNonAlloc for best performance) Array with connected peers Get copy of current connected peers (slow! use GetPeersNonAlloc for best performance) Array with connected peers Get copy of peers (without allocations) List that will contain result State of peers Immediately disconnect peer from server without additional data peer to disconnect Disconnect peer from server peer to disconnect Disconnect peer from server and send additional data (Size must be less or equal MTU - 8) peer to disconnect additional data Disconnect peer from server and send additional data (Size must be less or equal MTU - 8) peer to disconnect additional data Disconnect peer from server and send additional data (Size must be less or equal MTU - 8) peer to disconnect additional data data start data length Peer connection state Network peer. Main purpose is sending messages to specific peer. Current connection state Connection id for internal purposes, but can be used as key in your dictionary of peers Peer ip address and port Current ping in milliseconds Current MTU - Maximum Transfer Unit ( maximum udp packet size without fragmentation ) Time since last packet received (including internal library packets) Peer parent NetManager Application defined object containing data about the connection Statistics of peer connection Gets maximum size of packet that will be not fragmented. Type of packet that you want send size in bytes Send data to peer Data Send options (reliable, unreliable, etc.) Send data to peer DataWriter with data Send options (reliable, unreliable, etc.) Send data to peer Data Start of data Length of data Send options (reliable, unreliable, etc.) Flush all queued packets Address type that you want to receive from NetUtils.GetLocalIp method Some specific network utilities Request time from NTP server and calls callback (if success) NTP Server address port callback (called from other thread!) Get all local ip addresses type of address (IPv4, IPv6 or both) List with all local ip adresses Get all local ip addresses (non alloc version) result list type of address (IPv4, IPv6 or both) Get first detected local ip address type of address (IPv4, IPv6 or both) IP address if available. Else - string.Empty