// the find
nxrighthere/NanoSockets
Lightweight UDP sockets abstraction for rapid implementation of message-oriented protocols
A minimal C library wrapping UDP sockets with a blittable C# binding on top, built for game networking where you want raw send/receive without a full transport protocol on top. It's aimed at Unity/game devs who want to layer their own reliability/ordering logic (or none) instead of adopting something like ENet.
The API surface is honestly just sockets — Create, Bind, Connect, Send, Receive, Poll — so there's no hidden protocol overhead or opinionated message format forced on you. The managed side uses blittable structs (Socket, Address) which means P/Invoke calls avoid marshaling costs, which actually matters if you're calling Send/Receive every frame in a game loop. Dual-stack IPv4/IPv6 is handled transparently through one Address type instead of forking your code per address family. The native implementation is small enough (one .c/.h pair) to read end to end in a sitting if something goes wrong.
Last commit is from March 2022 and the only CI is a stale .travis.yml — there's no sign this gets rebuilt for Apple Silicon, and prebuilt binaries are x64-only for macOS. There are zero tests in the repo, so any behavioral change (or platform quirk) has no safety net. Being raw UDP, you get no reliability, ordering, or fragmentation — that's fine if you know what you're doing, but it means you're building a chunk of ENet/LiteNetLib yourself before this is usable in a real game. The docs have a small but telling gap: the usage examples call SetNonBlocking(socket) with one argument while the API reference lists a two-argument SetNonBlocking(socket, bool) signature, which will trip up a first-time integrator.