networkprotocol/yojimbo
FreeA network library for client/server games written in C++
About networkprotocol/yojimbo
Yojimbo is a network library for client/server games written in C++, designed around the networking requirements of competitive multiplayer games like first person shooters. It provides cryptographically secure authentication via connect tokens, encrypted and signed packets over UDP, packet fragmentation and reassembly, a bitpacker and serialization system, and support for unreliable-unordered and reliable-ordered messages with aggressive resend until acknowledgment. It also includes data blocks larger than maximum packet size attached to reliable-ordered messages, and estimates of latency, jitter, packet loss, and bandwidth per-connection. The library is stable and production ready, built on top of netcode, reliable, and serialize libraries by the same author. It is single-threaded and designed for up to 100 players with identical client and server configurations.
Key Features
Pros & Cons
- Stable and production ready
- Cryptographically secure authentication and encryption
- Built on reliable open-source libraries (netcode, reliable, serialize)
- Designed specifically for competitive multiplayer game networking needs
- Provides detailed per-connection network metrics (latency, jitter, packet loss, bandwidth)
- Limited to client/server model (no P2P support)
- Supports a maximum of 100 players
- Single-threaded; all calls must be from the same thread
- Client and server configurations must be identical, requiring manual synchronization
- Not suitable for turn-based or large-scale MMOs