LiteNetLib is a lightweight reliable UDP networking library for .NET Standard 2.1, Mono, and related platforms.
The library addresses the need for efficient peer-to-peer networking in applications where TCP overhead is undesirable. It provides multiple delivery guarantees through different send mechanics: reliable with order, reliable without order, reliable sequenced (last packet only), ordered but unreliable with duplication prevention, and simple unreliable UDP packets. The approach minimizes overhead with just one byte added to unreliable packets and four bytes to reliable ones, while handling fragmentation, packet merging, and MTU detection automatically.
Developers should choose this tool for games and real-time applications requiring low-latency networking across multiple platforms. It suits projects targeting Unity, MonoGame, Godot, or standard .NET environments on Windows, Mac, Linux, and mobile platforms including iOS and Android. The library includes helper classes for message serialization, connection statistics, NAT hole punching, and multicasting for local network discovery. For Unity specifically, the project recommends using library sources or the OpenUPM package rather than precompiled DLLs due to platform-specific code paths and workarounds.
The project maintains active communication channels through Matrix and Discord. Development includes continuous integration builds from the master branch alongside stable release artifacts. The codebase incorporates modern optimizations such as support for .NET8 socket calls to reduce garbage collection overhead. Documentation is available through a dedicated website with usage manuals for the packet serializer and other components.