WebSocket++ 0.6.0 has been released

Highlighted Changes

Minor breaking changes

  • A new required method has been added to the transport and socket policy api. An implementation is optional. All built in transport policies have been updated. Authors of custom transports will need to, at minimum, add an empty method with the right signature.
  • A C++11 related dependency cleanup has swapped the dependency on libboost-date_time for libboost-chrono for C++03 compilers using Boost version 1.49 and later. C++11 compilers will no longer need libboost-date_time at all. C++03 compilers using Boost 1.48 and older are not affected and will still require libboost-date_time.

Adds non-blocking HTTP handlers
Non-blocking http handlers provide significant performance improvements for applications that need to serve a longer running HTTP response without blocking WebSocket traffic. See the HTTP Handler manual page for usage information.

Asio Transport TLS/Security related improvements

  • Asio Transport now supports outgoing connections using SNI when the underlying version of openssl supports it.
  • Bundled examples using the TLS enabled Asio config now demonstrate how to achieve compliance with Mozilla’s recommended TLS settings. echo_server_tls compiled with the modern flag and a modern version of openssl now passes the SSL Labs server test with a grade of A.

Standalone Asio now supported
Asio Transport may optionally use standalone Asio rather than Boost Asio. This allows the use of the Asio transport with a C++11 build environment without any Boost libraries. To enable, define ASIO_STANDALONE before any WebSocket++ or Asio headers.

Raw/iostream transport vectored write handler
The raw/iostream transport may now optionally register a handler for vectored or scatter/gather writes. This results in fewer callbacks and allows more efficient packing of multiple small writes into a single TCP packet or TLS record. If no vectored write handler is set, the standard write handler will be called multiple times.

WebSocket++ version 0.4.0 has been released.


This release includes a number of bug fixes and code/api housekeeping. There is a small handful of minor API breaking changes from 0.3.0. Even so, upgrading from 0.3.0 to 0.4.0 should be straight forward for all users and is highly encouraged.

Breaking Changes

Exception Type Change
The primary breaking change is the change in the type of exceptions that WebSocket++ throws. Prior to version 0.4.0 exceptions were thrown with a custom type websocketpp::lib::error_code. This presented a number of issues, primarily relating to not deriving from the standard std::exception base and not matching the semantics of std::exception.

Starting in version 0.4.0 all exceptions thrown by WebSocket++ will be of type websocketpp::exception which derives from std::exception. This normalizes all exception types under the standard exception hierarchy and allows WebSocket++ exceptions to be caught in the same statement as others. The error code that was previously thrown is wrapped in the exception object and can be accessed via the websocketpp::exception::code() method.

Custom Logging Policy Change
The API for building custom logging policies has been updated to be slightly more generic. In particular it no longer mandates the use of std::ostream. As a result any custom logging policies will need to change/add a few constructors to match the new API. All logging policies bundled with WebSocket++ (the stub/none policy and the default ostream logger) have been updated. If you only use the default logging policies there are no changes you need to make.

Utility method signatures
Three utility methods have had their signatures updated. These methods are not part of WebSocket++’s public API but some users may use the bundled versions in lieu of including their own libraries for convenience. If you are using any of these utility methods you may need to update your call sites:

October 2013 WebSocket++ Update


Two 0.3.x alpha releases have been made since the last update. No major features have been added. A few minor features have been added and many bugs have been fixed. Highlights of these are included below, the full release notes can be found in the repository itself as well as on the Change Log page.

Highlighted Changes

  • Removes dependency on boost/std <regex> library. This brings full C++11 compatibility to GCC 4.6+ and avoids the requirement of bundling the rather large boost regex binary for space constrained embedded applications.
  • HTTP header processing case sensitivity has been reworked. Case used for reading headers is ignored per HTTP 1.1 spec. Case for headers you set will be preserved to help deal with other HTTP implementations that require certain cases.
  • Bundled third party library licenses have been consolidated in the COPYING file. Sha1 library was replaced with a different one under a BSD license rather than a freeware license to address concerns about ambiguous license wording. All bundled libraries now use Expat MIT or BSD licensing.
  • Asio transport introduces stop_listen method to allow a server to stop accepting new connections.
  • iostream transport introduces set_secure, set_remote_endpoint, eof, and fatal_error methods to allow users of this transport to pass information about the connection through to the library.
  • Updates close code types and validation based on recent updates to the IANA registry.
  • Updates to asio transport thread safety and re-introduces strands to allow io_service thread pools to work again.
  • Removes unused experimental code. This should reduce memory usage and improve performance, especially of creating and destroying connections.

Roadmap for 0.4.x

The alpha4 release today will likely be the last 0.3.x alpha. The next release will be tagged 0.4.x as there will be a few (very minor) breaking api changes.

May 2013 WebSocket++ Update


The 0.3.x branch is now feature complete. It has been published and tagged as 0.3.x-alpha2 on the master branch on GitHub. This includes code that used to be the experimental and 0.3.x-cmake branches. Those branches are now obsolete and will be deleted in the near future. All releases from this point forward will be on the master branch and semantically versioned. Detailed change logs are available on the change log page as well as in changelog.md in the repository.

  • Doxygen documentation for the 0.3.x branch is now available at doxygen.websocketpp.org
  • Autobahn reports for the 0.3.x branch are now available at autobahn.websocketpp.org
  • WebSocket++ now supports explicit proxies for outgoing client connections (both ws and wss)

Detailed changes

  • Basic cmake build & install support added
  • Transport level timers have been implemented (proxy/connect/DNS resolve/socket shutdown/TLS handshake)
  • WebSocket level timers have been implemented (open/close handshake, ping/pong timeout)
  • Added connection methods for retrieving the close codes, reasons, and underlying error code from closed connections
  • Explicit outgoing proxy support
  • Corrects a number of issues with end of connection behavior, especially for clients.
  • TLS shutdown is no longer blocking
  • Hybi00 close frame support
  • Lots of documentation
  • removes may unused files and other dead code

Roadmap for the final 0.3.x release

  • continue cleaning up code style
  • bugfixes
  • more documentation
  • more tests

Roadmap for 0.4.x

  • 0.4.x will be backwards compatible with 0.3.x
  • Implement permessage-deflate extension
  • Remove dependency on <regex> header that has poor support in GCC

April 2013 WebSocket++ Update

New features to the 0.3.x (experimental) branch in April:

  • Subprotocol Negotiation
  • Hixie 76 / Hybi 00 support
  • Outgoing explicit proxy support for WS and WSS connections
  • Proxy authentication: Basic auth scheme
  • Ability to log to an arbitrary stream (including files)
  • Improves detail, consistency, and performance of error and access logging
  • Several new examples (telemetry client, print_server, testee_server, iostream_server)
  • First pass on performance improvements
  • Many adjustments to improve support for Visual Studio
  • Library builds and passes tests on 32 bit and PowerPC architectures.

Roadmap for May:

The last blocking feature for the 0.3.0 release is the implementation of timeouts for several network related events. Most other work will be related to testing and fixing bugs in preparation for an official 0.3.0 beta release around the end of the month.

Notice for users of the 0.2.x version.

If your software or build system is relying on the 0.2.x version being the master branch on GitHub you will need to make some changes in the near future. I would encourage you to update your code to the 0.3.x interfaces. If this is not possible, there is now a 0.2.x branch in Git that will hold 0.2.x code indefinitely.

New Forum/Mailing lists

WebSocket++ Forum / Discussion

This is an open discussion/support forum for usage questions, support requests, feature requests, and other more detailed development related discussion that isn't appropriate for a GitHub issue. In general, if the answer/discussion topic will be useful to other people after the issue is resolved it should go on this list rather than a GitHub issue.

WebSocket++ Announcements Mailing List

This is a low volume moderated mailing list that will include these monthly development updates as well as notifications of new official library releases.

March 2013 WebSocket++ Update

As of tonight, the WebSocket++ 0.3.x (experimental) branch has been updated with a number of new features that bring it pretty close to parity with 0.2.x. The last major missing feature, the client role, has been completed. 0.3.x now has a client role available by including <websocketpp/client.hpp> and three new default configs, core_client, asio_client, and asio_no_tls_client. These mirror the respectively named server configs. The client role will function both networkless via the iostream transport or via TCP/IP using the Boost ASIO based transport. The 0.3.x client passes all autobahn test suite tests strictly. An example client is available in the examples folder.

Other recent notable changes:

  • All examples and unit tests compile and run on 32 bit intel processors (i686)
  • RNG support
  • Override-able connection base class
  • Numerous new examples and manual pages

The readmes for both major branches have been updated with more detailed information about the status of each branch. These will continue to be updated. Remaining features before 0.3.x will be ready to replace version 0.2.x:

  • Subprotocol Negotiation
  • Hybi00/Hixie76 protocol support
  • PowerPC/ARM bug fixes
  • Performance tuning, particularly in the area of message buffer pools

Unless you need these features specifically, 0.3.x is the recommended version.

The past and future of WebSocket++

I have long been interested in writing and experimenting with web based virtual worlds. Some of my more recent projects in that area ran into communication limitations. In 2010 there was no good way to do low latency bidirectional communication to a browser without resorting to non-standard plugins. While researching my options I came across the IETF hybi working group that was chartered to develop exactly what I was looking for. As this is a capability I felt the web sorely needed a standard solution for I joined the group.

WebSocket++ was born as an early implimentation of the WebSocket protocol to test out ideas proposed by the working group and later on performance and interoperability tests. In the last two years there have been three major versions of WebSocket++. Versions tagged 0.1 were very rough experimental versions and not compatible with the final RFC6455 spec. It can be found in the 'legacy' branch on GitHub. Version 0.2 was built for performance and interoperability testing (alongside my work implimenting tests for the Autobahn suite). It can be found in the 'Master' branch on GitHub.

While it is a complete implimentation of RFC6455 a number of early design decisions made it impractical for certain use cases, especially those involving multithreading. In the year or so that version 0.2 has been available I have gathered a great deal of feedback about how developers are using C++ WebSocket libraries. I've continued to work with the hybi group on standardizing some extensions to the WebSocket protocol, in particular message compression. The completion of C++11 has also brought a number additional options that make sense to use. To address these issues and build a library more suitable for general purpose usage I have been working on a third (and hopefully final) version of the library, 0.3. If no major issues are raised, 0.3 will become the stable 1.0 release.

Subscribe to RSS - websocketpp