allinurl/gwsocket
Freefast, standalone, language-agnostic WebSocket server RFC6455 compliant
About allinurl/gwsocket
gwsocket is a simple, standalone, language-agnostic WebSocket server written in C, fully compliant with RFC6455. It acts as a bridge between your application and the client's browser, enabling fast bidirectional communication. Data is transferred by piping the application's stdout into gwsocket (via stdin or a named pipe), which then forwards it to connected browsers. It supports both broadcast mode via stdin/stdout and targeted messaging via a strict mode protocol. The server features message fragmentation, UTF-8 handling, multiplexed non-blocking I/O, and origin-based restriction. It passes the Autobahn Testsuite and is Valgrind tested, with no external dependencies beyond standard build tools.
Key Features
Pros & Cons
- Extremely simple setup: just pipe data and it works
- No external dependencies, easy to compile and deploy
- Language-agnostic: works with any program that outputs to stdout
- Compliant with WebSocket RFC6455 (passes Autobahn tests)
- Supports both broadcasting and targeted client messaging
- Broadcast mode limited to sending to all clients; targeted messaging requires strict mode
- Written in C, requires compilation from source
- No built-in SSL/TLS support (can be proxied via another server)
- Not a full-featured WebSocket framework; focuses on piping data in/out