karlseguin/websocket.zig
WebSocket server and client library for Zig
- Chart
- Not on a chart right now
- Stars
- 528
What it is
A WebSocket server and client library targeting Zig 0.17.0. It processes one message at a time per connection while allowing concurrent writes on the connection.
Who it is for
Zig developers building backend servers or networked applications that need real-time bidirectional communication.
Why it is trending
It uses non-blocking kqueue or epoll I/O on Linux, macOS, and BSD while falling back to thread-per-connection blocking mode on other platforms such as Windows. It also supports compile-time message pre-framing and an optional thread-local allocator in message handlers.
Main features
- Handshake validation and custom response header configuration
- Handler lifecycle callbacks including init, afterInit, clientMessage, and close
- Compile-time message pre-framing with frameText and frameBin
- Non-blocking epoll/kqueue I/O with blocking mode fallback
Summarized on November 17, 2026 from the README and repository data. It can be wrong; check the source before relying on it. Report a wrong summary