Netcode.IO.NET
Netcode.IO.NET is a pure managed C implementation of the Netcode.IO specification, targeted at .NET 3.5 with no native DLLs or wrappers for maximum portability. It uses a customized version of the Bouncy Castle cryptography library instead of libsodium. The library is designed for use in games and is optimized to minimize garbage collection allocations, making it suitable for performance-sensitive environments. The API resides in the NetcodeIO.NET namespace and provides three main components. The Server API allows creating a server with a maximum client count, public address, port, protocol ID, and private crypto key, then listening for events such as client connections, disconnections, payloads, and log messages. The Server can send payloads to clients, disconnect clients, access 256-byte user data from connect tokens, and stop gracefully. The Client API supports creating a client, listening for state changes and incoming messages, connecting to a server using a 2048-byte connect token, sending payloads, and