Lite reliable UDP library for Mono and .NET
Socket.Send
/Socket.Receive
NetDataReader.Get(out ...)
methodsNetManager.SendToAll
with ReadOnlySpan
NetDataReader.GetRemainingBytesSpan()
NetManager.DontRoute
option for sockets (for specific cases)AllowPeerAddressChange
works only if you implement IPeerAddressChangedListener
(now it works without implementing)For installation in typical .NET project use nuget package For Unity use sources zip and copy directory LiteNetLib to your project
NetDataReader
(string.Empty
instead null
as in 0.9.5.2)ConcurrentQueue
that spawns garbage back to Queue
)MaxSinglePacketSize
(0.9.5.2 behaviour)PausedSocketFix
(iOS unity) improvedFor installation in typical .NET project use nuget package For Unity use sources zip and copy directory LiteNetLib to your project
NetManager.UseNativeSockets
mode that reduces GC of .NET sockets and improves performance especially for "server" usage.Send
calls without copy CreatePacketFromPool(DeliveryMethod deliveryMethod, byte channelNumber)
SendPooledPacket(PooledPacket packet, int userDataSize)
OnNetworkReceive
eventNetPeer.RemoteId
that represents peer id assigned on remote side (typically server) that can be used as Server Peer Id..asmdef
for UnityReadOnlySpan<byte>
sendAllowPeerAddressChange
option (false by default) that allows clients to change Endpoint when switching from 4G to Wifi or something similarTryGetPeerById
helper methodNetDataWriter.EnsureFit
method to resize internal array if data not fitsRoundTripTime
to peer (ping is RTT/2 leaved for compatibility with old code)NetDataWriter
from NetPacketProcessor
to avoid multithreading "issues". Add Get<T>
to NetDataReader
for structs and separate method for classes with constructor argument to avoid Activator.CreateInstance
slow callFor installation in typical .NET project use nuget package For Unity use sources zip and copy directory LiteNetLib to your project
For installation in typical .NET project use nuget package For Unity use sources zip and copy directory LiteNetLib to your project
(changes since 0.9.5)
(changes since 0.9.4)
For installation in typical .NET project use nuget package For Unity use sources zip and copy directory LiteNetLib to your project
For installation in typical .NET project use nuget package For Unity use sources zip and copy directory LiteNetLib to your project
(changes since 0.9.3.1)
List<T>
when you register them with static Read/Write methods (#390)(changes since 0.9.3)
PollEvents()
(changes since 0.9.2.2)
List<T>
for NetSerializer
/NetPacketProcessor
for custom types (nested types from wiki)DisconnecReason.PeerToPeerConnection
) (#374, #366)NetExceptions.cs
to NetDebug.cs
so NetExceptions.cs
is deleted(changes since 0.9.3)
PollEvents()
(changes since 0.9.2.2)
List<T>
for NetSerializer
/NetPacketProcessor
for custom types (nested types from wiki)DisconnecReason.PeerToPeerConnection
) (#374, #366)NetExceptions.cs
to NetDebug.cs
so NetExceptions.cs
is deletedList<T>
for NetSerializer
/NetPacketProcessor
for custom types (nested types from wiki)DisconnecReason.PeerToPeerConnection
) (#374, #366)NetExceptions.cs
to NetDebug.cs
so NetExceptions.cs
is deleted