LiteNetLib 1.0.1.1
- Experimental
NetManager.UseNativeSockets
mode that reduces GC of .NET sockets and improves performance especially for "server" usage. - Add PooledPackets for faster
Send
calls without copyCreatePacketFromPool(DeliveryMethod deliveryMethod, byte channelNumber)
SendPooledPacket(PooledPacket packet, int userDataSize)
- Add channel to the
OnNetworkReceive
event - Add
NetPeer.RemoteId
that represents peer id assigned on remote side (typically server) that can be used as Server Peer Id. - Add
.asmdef
for Unity - Add
ReadOnlySpan<byte>
send - Add
AllowPeerAddressChange
option (false by default) that allows clients to change Endpoint when switching from 4G to Wifi or something similar - Add
TryGetPeerById
helper method - Add
NetDataWriter.EnsureFit
method to resize internal array if data not fits - Add
RoundTripTime
to peer (ping is RTT/2 leaved for compatibility with old code) - Add NetworkReset (WSAENETRESET - 10052) to ignored errors which fixes some disconnection cases
- Remove
NetDataWriter
fromNetPacketProcessor
to avoid multithreading "issues". AddGet<T>
toNetDataReader
for structs and separate method for classes with constructor argument to avoidActivator.CreateInstance
slow call - Correctly check new MTU when using extra package layer
- Update minimal .net version to 4.6 (C# 7.3). Minimal supported Unity version now is 2018.3
- Increased overall performance. Less copies, less "virtual" calls, other things
For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project