LiteNetLib 1.0.1.1
- Experimental
NetManager.UseNativeSocketsmode that reduces GC of .NET sockets and improves performance especially for "server" usage. - Add PooledPackets for faster
Sendcalls without copyCreatePacketFromPool(DeliveryMethod deliveryMethod, byte channelNumber)SendPooledPacket(PooledPacket packet, int userDataSize) - Add channel to the
OnNetworkReceiveevent - Add
NetPeer.RemoteIdthat represents peer id assigned on remote side (typically server) that can be used as Server Peer Id. - Add
.asmdeffor Unity - Add
ReadOnlySpan<byte>send - Add
AllowPeerAddressChangeoption (false by default) that allows clients to change Endpoint when switching from 4G to Wifi or something similar - Add
TryGetPeerByIdhelper method - Add
NetDataWriter.EnsureFitmethod to resize internal array if data not fits - Add
RoundTripTimeto peer (ping is RTT/2 leaved for compatibility with old code) - Add NetworkReset (WSAENETRESET - 10052) to ignored errors which fixes some disconnection cases
- Remove
NetDataWriterfromNetPacketProcessorto avoid multithreading "issues". AddGet<T>toNetDataReaderfor structs and separate method for classes with constructor argument to avoidActivator.CreateInstanceslow 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