Skip to content

v0.14.0

Compare
Choose a tag to compare
released this 28 Mar 10:48
· 1088 commits to master since this release

This release is a major internal refactor and redesign aimed at C++ programmers specifically.

Features

  • Adds support for multiple event systems (libuv, ASIO & epoll).
  • Highly optimized memory usage - 37% of prior version 0.13.0.
  • Optimized parser and control frame receive paths - 4-8x the performance.
  • Optional thread safety of documented functions (compile with UWS_THREADSAFE).
  • Hub::connect now takes optional headers such as origin.
  • Removes CMake, improves native Makefile, adds native VC++.vcxproj.
  • Adds onTransfer callback.
  • Mingw64 compiler support.

Fixes

  • Sets SOCK_CLOEXEC on Linux and FreeBSD.
  • Properly handles WSAEWOULDBLOCK on Windows.
  • Memory leaks on send errors.
  • Parser crash on very long messages.
  • Travis CI now runs all native tests with every commit.
  • Removes Node.js addon from main repository, it now lives in bindings repo.

Interface changes

  • In prior versions a WebSocket could be represented by a void pointer, an uv_poll_t pointer or a WebSocket object. This kind of chameleon black magic is removed and there is now only WebSocket pointers in use.
  • WebSockets are handed out as pointers in all event handlers.
  • Send callbacks now give a pointer to a WebSocket rather than a void pointer.
  • There is no longer any getPollHandle() and you cannot construct a WebSocket from an uv_poll_t pointer.
  • Lots of encapsulation fixes, most structs are now exposing only the official API and not its internals.
  • uWS::Group::listen(uWS::TRANSFERS) is a new way to express uWS::Group::addAsync().