zpl-c/enet logo

zpl-c/enet

Free

⚡️ ENet reliable UDP networking library

FreeFree tier
Type
Open Source

About zpl-c/enet

ENet is a simple, lightweight, and reliable UDP networking library written in pure C. It provides a thin network communication layer on top of UDP, offering optional reliable in-order packet delivery, packet fragmentation, and integrated IPv6 support. This fork of the original lsalzman/enet includes project-wide code style cleanup, monotonic time, single-header style code, and removal of outdated methods. ENet omits higher-level features like authentication, encryption, and server discovery to remain flexible, portable, and easily embeddable. It can be used as a shared library, static library, or single-header file (preferred).

Key Features

Optional reliable, in-order delivery of packets
Packet fragmentation and reassembly
Integrated IPv6 support
Monotonic time support
Single-header style code (preferred usage)
Lightweight and portable, written in pure C
Shared and static library build options via CMake
No built-in encryption, authentication, or server discovery (intentional for flexibility)

Pros & Cons

Pros
  • Lightweight and simple API with minimal overhead
  • Portable across platforms (written in pure C)
  • Single-header option for easy integration
  • IPv6 support built-in
  • Active fork with code improvements and modernizations
  • Well-documented usage examples for server and client
Cons
  • No built-in encryption or authentication (must be added externally)
  • No server discovery, lobbying, or high-level features
  • Limited to UDP transport; not suitable for TCP-required scenarios
  • Documentation and community support may be smaller than larger networking libraries

Best For

Real-time multiplayer game networkingReliable communication over UDP in applications requiring low latencyEmbedded systems or projects needing a minimal network layerPrototyping or replacing raw UDP with simple reliability

FAQ

What is ENet?
ENet is a simple, lightweight, and reliable UDP networking library written in pure C. It provides optional reliable in-order delivery and packet fragmentation on top of UDP.
How do I use ENet as a single-header library?
Download the enet.h file from the releases, define ENET_IMPLEMENTATION in exactly one source file before including enet.h, and you can use the library directly.
Does ENet support IPv6?
Yes, this fork includes integrated IPv6 support.
What features are intentionally omitted from ENet?
ENet omits authentication, lobbying, server discovery, encryption, and other application-specific features to remain flexible and portable.