Skip to content

LiteNetLib 1.0.1.1

Compare
Choose a tag to compare
@RevenantX RevenantX released this 02 Apr 10:28
· 87 commits to master since this release
  • Experimental NetManager.UseNativeSockets mode that reduces GC of .NET sockets and improves performance especially for "server" usage.
  • Add PooledPackets for faster Send calls without copy CreatePacketFromPool(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 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 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