uWebSockets.js

μWebSockets for Node.js back-ends

APACHE-2.0 License

Downloads
255.8K
Stars
7.5K
Committers
42

Bot releases are visible (Hide)

uWebSockets.js - v20.23.0

Published by uNetworkingAB over 1 year ago

  • Updates uWS to v20.39.0.
uWebSockets.js - v20.22.0

Published by uNetworkingAB over 1 year ago

Node.js LTS 16, 18, 20 support

  • Three latest LTS of Node.js supported.
  • Node.js 19 support removed.
uWebSockets.js - v20.21.0

Published by uNetworkingAB over 1 year ago

uWebSockets.js - v20.20.0

Published by uNetworkingAB over 1 year ago

uWebSockets.js - v20.19.0

Published by uNetworkingAB almost 2 years ago

  • Recompiles on Ubuntu 20.04 instead of Ubuntu 22.04 for increased binary compatibility.
uWebSockets.js - v20.18.0

Published by uNetworkingAB almost 2 years ago

  • Updates uWS to v20.36.0
uWebSockets.js - v20.17.0

Published by uNetworkingAB almost 2 years ago

TypeScript updates for C++ alignment

The typings are now more strict and more aligned with the C++ interface. This means that documentation for TypeScript is more applicable to C++ and vice versa. In fact, the C++ examples are in many aspects identical to what you would write in TypeScript (ignoring syntax differences).

The biggest change is that you can no longer attach any key/value pair to WebSocket. You must define a static interface of the members up front. This means the type of WebSocket is now WebSocket<UserData> and WebSocket.getUserData() returns UserData.

Here is a complete example in TypeScript:

interface UserData {
    openDate: number;
}

uWS.App().ws<UserData>("/", {
    open: (ws) => {
        ws.getUserData().openDate = Date.now();
    },
    close: (ws, code, message) => {
        console.log("WebSocket with openDate " + ws.getUserData().openDate + " left.");
    }
}).listen(3000, (listenSocket) => {
    
});

and for comparison here is the equivalent example in C++:



struct UserData {
    time_t openDate;
}

uWS::App().ws<UserData>("/", {
    .open = [](auto *ws) {
        ws->getUserData()->openDate = clock();
    },
    .close = [](auto *ws, auto code, auto message) {
        std::cout << "WebSocket with openDate " << ws->getUserData()->openDate << " left." << std::endl;
    }
}).listen(3000, [](auto *listenSocket) {
    
});

Obviously, this only applies to TypeScript users. JavaScript users can still attach anything to anything without limitation and do not need to use getUserData(). So JavaScript code is unaffected by this change.

uWebSockets.js - v20.16.0

Published by uNetworkingAB almost 2 years ago

A bigger update

  • This update contains maxLifetime, unix sockets, subscription events and many fixes and new docs additions.
  • Updates uWS to v20.35.0
uWebSockets.js - v20.15.0

Published by uNetworkingAB almost 2 years ago

  • Updates uWS to v20.30.0
  • Adds ARMv7 binaires for Linux (unsupported)
uWebSockets.js - v20.14.0

Published by uNetworkingAB about 2 years ago

Node.js 19 and more HTTP fixes

  • uWS v20.25.0
  • Dropped Node.js 14 even though it is an LTS release (due to major performance regression).
uWebSockets.js - v20.13.0

Published by uNetworkingAB about 2 years ago

Http fixes and whitelisting Node.js 16

  • Bumps uWS to v20.24.0
  • While Node.js 16 performs worse than Node.js 18, it does not perform as catastrophically bad as Node.js 14. Therefore we do whitelist it again.
uWebSockets.js - v20.12.0

Published by uNetworkingAB about 2 years ago

Blacklist Node.js 14 and 16

  • Enormous performance regressions in Node.js 16 and 14 introduced by Node.js maintainers, have caused an unacceptable 75% performance decrease in uWS.js. Therefore we are forced to reject these broken versions of Node.js until Node.js maintainers get their act together and start benchmarking their changes.
  • Node.js 18.10 is known to perform reasonably well, and is kept whitelisted.
uWebSockets.js - v20.11.0

Published by uNetworkingAB about 2 years ago

Experimental HTTP/3 and much more

Updates uWS from v20.14.0 to v20.23.0 which brings many (stable) improvements. Please have a read over at https://github.com/uNetworking/uWebSockets/releases for a more complete explanation of all the changes involved.

Other than these stable changes, all platforms now ship with (still experimental) HTTP/3 support enabled. It is known to work on Linux - macOS still has some missing pieces and Windows is entirely broken for now. You can try the H3lloWorld.js example as a starting point, even though there have been more visual demos presented.

HTTP/3 support in this release is to be considered entirely broken for any production purposes, see it more as a bonus coming along the (many) stable changes.

uWebSockets.js - v20.10.0

Published by over 2 years ago

  • Wraps endWithoutBody
  • Properly returns all 3 sendStatus from send calls (backwards compatible)
  • Merges a few PRs updating docs, adding ESM wrapper, etc
uWebSockets.js - v20.9.0

Published by over 2 years ago

  • Updates to uWS 20.14.0.
uWebSockets.js - v20.8.0

Published by over 2 years ago

  • Updates to uWS 20.13.0.
uWebSockets.js - v20.7.0

Published by over 2 years ago

Node.js 18, LTS-only

With this release and going forwards we will support only LTS versions of Node.js. Every year one new LTS version will be added and one old will be dropped. This means we always support a rolling set of 3 LTS versions. This release supports 14, 16 and 18.

uWebSockets.js - v20.6.0

Published by almost 3 years ago

  • Adds HttpResponse pause/resume throttling
uWebSockets.js - v20.5.0

Published by almost 3 years ago

  • Various fixes
uWebSockets.js - v20.4.0

Published by almost 3 years ago

  • Updates uWS to v20.8.0, fixing broken compression