Releases: RevenantX/LiteNetLib
LiteNetLib 1.3.1
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 useMtuOverride
). To enable MTU discovery setNetManager.MtuDiscovery
totrue
- Add optional argument max processed events into
PollEvents
andManualReceive
(fix #528) - Add methods to serialize and deserialize array of nested
INetSerializable
intoNetDataReader/Writer
- Add
GUID
serialization toNetDataWriter/Reader
andNetSerializer
/NetPacketProcessor
- Add
SendUnconnectedMessage
withReadOnlySpan
argument - Add
NetDataWriter.AsReadOnlySpan()
- Add
GetRemainingBytesMemory
method toNetDataReader.
(fix #560) - Make PeerTimers and ElapsedMilliseconds as float (fix #521)
- Improve
NetDataWriter/Reader
strings. - Add
PutLargeString
(with int size) andGetLargeString
intoNetDataWriter/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
- 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 useMtuOverride
). To enable MTU discovery setNetManager.MtuDiscovery
totrue
- Add optional argument max processed events into
PollEvents
andManualReceive
(fix #528) - Add methods to serialize and deserialize array of nested
INetSerializable
intoNetDataReader/Writer
- Add
GUID
serialization toNetDataWriter/Reader
andNetSerializer
/NetPacketProcessor
- Add
SendUnconnectedMessage
withReadOnlySpan
argument - Add
NetDataWriter.AsReadOnlySpan()
- Add
GetRemainingBytesMemory
method toNetDataReader.
(fix #560) - Make PeerTimers and ElapsedMilliseconds as float (fix #521)
- Improve
NetDataWriter/Reader
strings. - Add
PutLargeString
(with int size) andGetLargeString
intoNetDataWriter/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
- 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
withReadOnlySpan
- 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 implementIPeerAddressChangedListener
(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
- Use old behaviour of reading empty strings from
NetDataReader
(string.Empty
insteadnull
as in 0.9.5.2) - Reverted channels code to 0.9.5.2 (change
ConcurrentQueue
that spawns garbage back toQueue
) - 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
- 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
LiteNetLib 0.9.5.2
- 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
(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
- 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.4
- Optimize CRC calculating
- Added UnsyncedReceiveEvent for making only NetworkReceiveEvent unsynced, while other events called from PollEvents
- Optimized packet pool to lock-free structure
- Optimized net events pool to lock-free structure
- Modified PacketLayerBase so that ProcessInboundPacket and ProcessOutboundPacket are both given the IPEndPoint of the sender/receiver, which is necessary for encryption layers that require per-connection state.
- Made NetStatistics thread-safe using Interlocked, PacketLoss is now monotonically increasing (previously, NetManager.Statistics.PacketLoss would drop if a NetPeer was removed).
- Flush method of NetManager replaced by NetManager.TriggerUpdate() which works asynchronously.
- Fixed list of structs serialization
- Some other fixes and optimizations
LiteNetLib 0.9.3.2
(changes since 0.9.3.1)
- Fix serializing of
List<T>
when you register them with static Read/Write methods (#390)
(changes since 0.9.3)
- Fix possible infinite(or very long) loop on high-load in
PollEvents()
(changes since 0.9.2.2)
- Protocol increased to 11
- Added support of
List<T>
forNetSerializer
/NetPacketProcessor
for custom types (nested types from wiki) - Fixed unsynced connect (#369)
- Added dual mode for IPv6 (one socket used for IPv4 and IPv6 - so you get less "receive" threads, but this doesn't tested on any platforms except Win/Linux)
- Improved hole punching code
- Fixed simultaneous P2P connection (you will get disconnect from one side with
DisconnecReason.PeerToPeerConnection
) (#374, #366) - Improved Unity iOS reconnect hack (#382)
- Added fix for Nintendo Switch
- Moved contents of
NetExceptions.cs
toNetDebug.cs
soNetExceptions.cs
is deleted