Libwebsockets is a C library providing client and server implementations for HTTP/1, HTTP/2, HTTP/3, WebSockets, WebTransport, MQTT, and other protocols.
The library addresses the need for a lightweight, security-focused networking layer that works across embedded systems and cloud infrastructure. It handles protocol negotiation and connection management while remaining configurable enough to integrate with existing event loops—libuv, libevent, libev, sdevent, glib, and uloop are all supported natively, and custom event libraries can be plugged in. The codebase includes built-in support for cryptographic operations through OpenSSL and MbedTLS, and implements auxiliary protocols like JSON, CBOR, JOSE, and COSE.
Developers should choose this library if they need a portable C networking foundation that scales from FreeRTOS embedded systems to cloud deployments. The project suits applications requiring multiple protocol support without heavyweight dependencies. The README provides over one hundred minimal examples under public domain licensing for quick prototyping, comprehensive topic-specific documentation, and Doxygen API reference material. Version 5.0 introduced QUIC and HTTP/3 support, WebRTC mixing capabilities, and expanded TLS options including Windows SChannel, GnuTLS, and BearSSL alongside the previously supported OpenSSL and MbedTLS.
The project maintains extensive continuous integration testing across platforms with each push. Active security auditing is ongoing, with the maintainers using automated analysis to identify and fix vulnerabilities. The codebase has undergone significant evolution, with version 5.0 representing a substantial update that deprecated earlier releases and introduced multiple new protocol implementations and TLS backends.