warmcat/libwebsockets
Freecanonical libwebsockets.org networking library
About warmcat/libwebsockets
Libwebsockets is a simple-to-use, MIT-licensed, pure C library providing client and server support for HTTP/1, HTTP/2, WebSockets, MQTT, and other protocols. It is designed to be lightweight, configurable, scalable, and flexible, suitable for tasks from embedded RTOS to mass cloud serving. The library supports a wide range of TLS backends including OpenSSL, MbedTLS, GnuTLS, SChannel, BearSSL, and others, and includes built-in support for QUIC, HTTP/3, and WebTransport. It integrates with multiple event loops (libuv, libevent, libev, sdevent, glib, uloop) and provides over 100 independent minimal examples to accelerate development. Ancillary implementations for JSON, CBOR, JOSE, and COSE are also included.
Key Features
Pros & Cons
- MIT license allows flexible use in commercial and open-source projects
- Wide TLS library support ensures compatibility across platforms
- Extensive event loop integration fits many application architectures
- Large collection of ready-to-use examples accelerates development
- Supports modern protocols like QUIC, HTTP/3, and WebTransport
- Primarily C code may require careful memory management
- Documentation can be dense for newcomers
- Some advanced features (e.g., QUIC) require specific TLS backends and build configuration