A portable, high-performance WebSocket client library written in C, designed for embedded systems and production environments.
Complete implementation of the WebSocket protocol with 100% Autobahn test suite compliance.
- Binary and text frame support
- Fragmentation and control frames (ping/pong/close)
- SSL/TLS support (wss://)
- Permessage-deflate compression
- Multi-threaded client support
- UTF-8 validation with overlong encoding detection
Echo - Simple echo subprotocol for testing and examples
STOMP 1.2 - Streaming Text Oriented Messaging Protocol
- Frame encoding and decoding
- Header processing
- Binary message support
MQTT 5.0 - Message Queuing Telemetry Transport with enhanced authentication
- All packet types (CONNECT, PUBLISH, SUBSCRIBE, PUBACK, PUBREC, PUBREL, PUBCOMP, DISCONNECT, AUTH)
- QoS levels 0, 1, and 2
- Retained messages
- Topic aliases for bandwidth optimization
- SCRAM-SHA-256 enhanced authentication (RFC 5802/7677)
- Subscription options
- Keep-alive with automatic PINGREQ/PINGRESP
- Session persistence
- Flow control and packet ID management
- Property system (38 property types)
Dependencies: autoconf, automake, libtool, libssl-dev, zlib1g-dev
./autogen.sh
./configure
make
sudo make installBuild options:
./configure --enable-threads=no # Disable multi-threading
./configure --enable-ssl=no # Disable SSL/TLS support./websocket-client wss://echo.websocket.org./stomp-client ws://localhost:61614./mqtt-client ws://localhost:8083/mqttRun unit tests:
make testRun integration tests:
make test-integrationComponent-specific tests:
make test-websocket # WebSocket unit and integration tests
make test-stomp # STOMP integration tests
make test-mqtt # MQTT unit and integration tests
make test-mqtt-auth # MQTT SCRAM-SHA-256 authentication testsQuality assurance:
make qa # Run full QA suite (build, test, valgrind, static analysis, security scan)
make valgrind # Memory leak detection
make static-analysis # cppcheck analysis
make security-scan # flawfinder security scanPlease consider supporting this project for ongoing success and sustainability. I'm a passionate open source contributor making a professional living creating free, secure, scalable, robust, enterprise grade, distributed systems and cloud native solutions.
I'm also available for international consulting opportunities. Please let me know how I can assist you or your organization in achieving your desired security posture and technology goals.
