WebSocket++

WebSocket++ is an open source (BSD license) header only C++ library that impliments RFC6455 The WebSocket Protocol. It allows integrating WebSocket client and server functionality into C++ programs. It uses interchangable network transport modules including one based on C++ iostreams and one based on Boost Asio.

Development Status

0.2.x, the current master branch on GitHub, is a complete implementation of RFC6455 and is stable (but not rigorously tested) in single threaded mode. The multi-threaded modes of 0.2.x are considered experimental and should be used carefully. 0.2 is no longer under active development for major new features, but it is actively supported with minor features and bug/security fixes. A change log for 0.2.x is available in the menu.

0.3.x, the experimental branch on GitHub, is intended to become the new primary stable branch. It is a major overhaul of 0.2.x with some breaking API changes. The primary goals for this refactoring were to clean up the core to enable stable multithreaded use, use with C++11, and support future WebSocket extensions. This branch includes comprehensive automated testing and will become the library's stable 1.0 release. As of March 2013, 0.3.x is a near complete implementation of RFC6455 (both client and server) and strictly passes all Autobahn tests. Remaining work is detailed in the branch readme.

Features

Server Library
Client Library
License BSD
Library Type Header only (0.3.x+)
Protocol Support Full support: RFC6455
Partial support: Hixie draft 76, Hybi Drafts 7-17
Browser Support Full support: FireFox 6+, Chrome 14+, IE 10+, Safari & Mobile Safari 6+,
Partial support: FireFox 4-5, Chrome 4-13, Safari 5.0.2+, Mobile Safari 4.2+, Opera 11.0+
Platform Support Generally portable. Tested with Linux, OS X, Windows. GCC, LLVM/Clang, Visual Studio. Intel x64, i386, PowerPC, ARM
API Type Asynchronous, message based
Message Types Binary and utf-8 text (not all browsers support binary)
Message Size Limit memory limited, configurable
TLS Support
IPv6 Support
Manual Ping/Pong
Proxy Support Outgoing explicit proxies for regular and secure WebSocket. Basic authentication.
Flow Control Configurable and poll-able queuing for sending and receiving.
Handshake features Passes through all HTTP headers for application use
subprotocol negotiation
custom HTTP errors for application defined handshake failures
application defined HTTP headers in handshake response
HTTP request pass through
Protocol Test Report Autobahn Report (Server)
Autobahn Report (Client)