Releases: RevenantX/LiteNetLib
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
LiteNetLib 0.9.3.1
(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
LiteNetLib 0.9.3
- 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