Skip to content

Releases: RevenantX/LiteNetLib

LiteNetLib 2.0

02 Feb 10:09

Choose a tag to compare

What's Changed

  • Set C# language version to 8 and minimal .net version to netstandard2.1

  • Add simplified and faster LiteNetManager with LiteNetPeer which has 1 reliable-ordered channel, 1 reliable-unordered, 1 sequenced channel (and unreliable channel) which is enough for many cases. ReliableSequenced channel is same as reliable-ordered in LiteNetPeer (where old NetManager can have more than 1 channel per DeliveryMethod as before and fully support ReliableSequenced channels for very specific use-cases)

  • Ntp requests now only supported in full NetManager

  • Merge additional listener interfaces into INetEventListener with default empty implementation. Merged methods:

    • OnMessageDelivered
    • OnNtpResponse
    • OnPeerAddressChanged
  • Add reliable packet merging which drastically increase speed of ReliableOrdered and ReliableUnordered channels when sending many small packets

  • Fix .net8 receive bug #552

  • Add Configurable Resend packet delay for reliable packets (#567)

  • Remove not threadsafe ConnectedPeerList. Add GetConnectedPeers instead. Fix #584

  • Increment packet loss in reliable channel only when there is pending packets. Fix #564

  • Optimizations and some additional protections

  • Simplify code using Spans and remove old #ifdefs for older .net versions

Full Changelog: 1.3.5...2.0.0

LiteNetLib 1.3.5

16 Dec 19:07

Choose a tag to compare

What's Changed

  • Fixed typos in readme by @AldeRoberge in #576
  • Fix NativeAddress update bug in FinishEndPointChange method by @Niaobu in #578
  • Support for connecting and writing span of bytes by @popcron in #577
  • Feature: Allow simulating outbound networking by @Niaobu in #579
  • Add incoming fragments limit
  • Prevent unnecessary allocations in NetManager.ProcessNtpRequests
  • Drop net471 in nuget packet (but it will work from source)
  • Some little additions to NetDataWriter/NetDataReader

New Contributors

Full Changelog: 1.3.1...1.3.5

LiteNetLib 1.3.1

23 Nov 21:20

Choose a tag to compare

Changes in 1.3.1

  • Fix crash when sending Merged byte without data
  • Add .net8 and .net7 targets (and nuget variants) to support specific features
  • Remove .net5 target because EOL. You can use .NET Standard for .net5.

Changes in 1.3.0

  • Stop running NetManagers in Unity in OnApplicationQuit (when using library source code)
  • Disable MTU discovery by default because some routers can break detection and connection in result. Remove UseSafeMtu (for this just use MtuOverride). To enable MTU discovery set NetManager.MtuDiscovery to true
  • Add optional argument max processed events into PollEvents and ManualReceive (fix #528)
  • Add methods to serialize and deserialize array of nested INetSerializable into NetDataReader/Writer
  • Add GUID serialization to NetDataWriter/Reader and NetSerializer/NetPacketProcessor
  • Add SendUnconnectedMessage with ReadOnlySpan argument
  • Add NetDataWriter.AsReadOnlySpan()
  • Add GetRemainingBytesMemory method to NetDataReader. (fix #560)
  • Make PeerTimers and ElapsedMilliseconds as float (fix #521)
  • Improve NetDataWriter/Reader strings.
  • Add PutLargeString (with int size) and GetLargeString into NetDataWriter/Reader
  • Fix ObjectDisposedException with Native Sockets (fix #542)
  • Lock unreliable channel only if there is pending packets
  • Unreliable packets optimization

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project

LiteNetLib 1.3.0

22 Nov 22:58

Choose a tag to compare

  • Stop running NetManagers in Unity in OnApplicationQuit (when using library source code)
  • Disable MTU discovery by default because some routers can break detection and connection in result. Remove UseSafeMtu (for this just use MtuOverride). To enable MTU discovery set NetManager.MtuDiscovery to true
  • Add optional argument max processed events into PollEvents and ManualReceive (fix #528)
  • Add methods to serialize and deserialize array of nested INetSerializable into NetDataReader/Writer
  • Add GUID serialization to NetDataWriter/Reader and NetSerializer/NetPacketProcessor
  • Add SendUnconnectedMessage with ReadOnlySpan argument
  • Add NetDataWriter.AsReadOnlySpan()
  • Add GetRemainingBytesMemory method to NetDataReader. (fix #560)
  • Make PeerTimers and ElapsedMilliseconds as float (fix #521)
  • Improve NetDataWriter/Reader strings.
  • Add PutLargeString (with int size) and GetLargeString into NetDataWriter/Reader
  • Fix ObjectDisposedException with Native Sockets (fix #542)
  • Lock unreliable channel only if there is pending packets
  • Unreliable packets optimization

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project

LiteNetLib 1.2.0

10 Jan 06:14

Choose a tag to compare

  • Derive NetPeer from IPEndPoint (so to get EndPoint of peer you just use peer instead of peer.RemoteEndPoint)
  • Add .NET8+ garbage less Socket.Send/Socket.Receive
  • Add .NET5+ Member Trimming Annotations
  • Add NetDataReader.Get(out ...) methods
  • Add NetManager.SendToAll with ReadOnlySpan
  • Add NetDataReader.GetRemainingBytesSpan()
  • Add optional NetManager.DontRoute option for sockets (for specific cases)
  • Sort Network Interfaces to prefer Wifi over Cellular (local ip)
  • Process shutdown error (for specific cases)
  • Fix AllowPeerAddressChange works only if you implement IPeerAddressChangedListener (now it works without implementing)
  • Better protections for broken data (fixes some critical cases that can "crash" server)
  • Overall optimizations

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project

LiteNetLib 1.1.0

24 Apr 18:16

Choose a tag to compare

  • Use old behaviour of reading empty strings from NetDataReader (string.Empty instead null as in 0.9.5.2)
  • Reverted channels code to 0.9.5.2 (change ConcurrentQueue that spawns garbage back to Queue)
  • Don't get from pool packets bigger than MaxSinglePacketSize (0.9.5.2 behaviour)
  • Remove dual mode support (because it slower than separate sockets, also doesn't work on some platforms including OSX).
  • Use one thread for both sockets IPv4 and IPv6.
  • Replace event queue by linked list type of queue. Fixes possible multithreaded bugs
  • Update documents to netstandard2.1
  • PausedSocketFix (iOS unity) improved

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project

LiteNetLib 1.0.1.1

02 Apr 10:28

Choose a tag to compare

  • 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

LiteNetLib 0.9.5.2

14 Oct 20:09

Choose a tag to compare

  • Fix offset in SendInternal for fragmented packets
  • Optimize resolve address
  • Optimize NetPacketProcessor hashing
  • Fix generic types registration in NetPacketProcessor
  • Added DisconnectOnUnreachable (now by default false) option to disable auto disconnect if NetworkUnreachable or HostUnreachable errors got

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project

LiteNetLib 0.9.5.1

26 May 16:06

Choose a tag to compare

(changes since 0.9.5)

  • Fixed source compilation in unity

(changes since 0.9.4)

  • Fixed packet double get from pool (changed lockfree to locks like in 0.8 because of ABA problem, but in a bit better way). This should fix some strange crashes
  • Added manual mode without threads for single-threaded servers
  • Added [IgnoreDataMember] attribute to NetSerializer
  • Added SetPosition to NetDataWriter
  • Added MTU override option
  • Major performance optimization when using multiple channels (#411)
  • Better internal packet recycling (less gc trash)
  • Increased default MTU to 1024 (from 576)
  • Moved NTP code to NetManager
  • Optimized receiving speed (1 copy less)
  • Fix MTU size when layer enabled
  • Fix LastProperty check
  • Fix merged packets verification

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project

LiteNetLib 0.9.5

19 May 08:23

Choose a tag to compare

  • Fixed packet double get from pool (changed lockfree to locks like in 0.8 because of ABA problem, but in a bit better way). This should fix some strange crashes
  • Added manual mode without threads for single-threaded servers
  • Added [IgnoreDataMember] attribute to NetSerializer
  • Added SetPosition to NetDataWriter
  • Added MTU override option
  • Major performance optimization when using multiple channels (#411)
  • Better internal packet recycling (less gc trash)
  • Increased default MTU to 1024 (from 576)
  • Moved NTP code to NetManager
  • Optimized receiving speed (1 copy less)
  • Fix MTU size when layer enabled
  • Fix LastProperty check
  • Fix merged packets verification

For installation in typical .NET project use nuget package
For Unity use sources zip and copy directory LiteNetLib to your project