Skip to content

Releases: uNetworking/uWebSockets

v20.72.0

28 Jan 14:40
Compare
Choose a tag to compare

Prepared Messages for Efficient Sending and Publishing

A feature from v0.14, previously removed due to lack of interest, has now been revived! Check out the demo in examples/Precompress.cpp to see it in action.

A PreparedMessage is a message that is compressed once but can be sent multiple times. This requires the SHARED_COMPRESSOR option but works with any decompressor option. The core idea is to decouple the compression process from the act of sending the message, reducing the per-socket computational overhead of compression to near zero.

Ideal Use Case

This feature is ideal for scenarios where you need to send snapshots of a data stream to multiple recipients. Here’s how it could work:

  • A timer periodically creates a new PreparedMessage containing the latest snapshot of the data (e.g., every 500ms).
  • When a WebSocket connects, it receives the most recent prepared snapshot, followed by incremental updates (deltas) from that point onward.
  • If the snapshot is large, pre-compressing it as a PreparedMessage eliminates the need for repeated compression, significantly reducing overhead for each socket.

Important Notes

  • This feature only works with SHARED_COMPRESSOR. Using a sliding window compression method is incompatible with this optimization.
  • New methods have been added to support this feature:
    • WebSocket::sendPrepared
    • App::publishPrepared
    • Loop::prepareMessage
  • You can create PreparedMessage objects on any thread, as long as that thread has its own Loop (which is automatically created for you via Loop::get()). However, in such cases, you must handle synchronization manually. Refer to examples/Precompress.cpp for guidance.

This release introduces the interface and its initial implementation. While memory-saving optimizations are not included in this release, they may be addressed in future updates.

v20.71.0

04 Dec 02:59
Compare
Choose a tag to compare
  • Examples are built in parallel
  • Supports building with all _LIBCPP_HARDENING_MODE
  • (Experimental) cached HTTP support is reverted for now, restoring fuzz builds
  • h1spec and test subject is added to CI
  • Disallow duplicate Host headers as per RFC9112

v20.70.0

26 Oct 21:18
Compare
Choose a tag to compare

More HTTP testing & corrections

This release adds more HTTP tests and makes some minor corrections for passing those tests:

Screenshot 2024-10-26 230016

v20.69.0

25 Oct 21:14
Compare
Choose a tag to compare

HTTP spec. compliance testing

A basic HTTP RFC9112 spec. compliance test has been added and minor changes have been made to pass all tests immediately:

Screenshot 2024-10-25 230748

This basic test catches no issues in Node.js, but it catches 2 issues in Deno (reported). The test can be found here:

https://github.com/uNetworkingAB/h1spec

In contrast, running the test on completely broken servers like mrhttp you get an obvious indication of so:

Screenshot 2024-10-25 231156

v20.68.0

21 Oct 10:47
Compare
Choose a tag to compare

Improved (restored) backwards compatibility

For some users, recent introduction of CachedApp broke seamless backwards compatibility. If you rely on uWS::App being uWS::TemplatedApp<false> and not something else (like uWS::CachedApp<false> 😉), this release fixes your build:

    typedef uWS::TemplatedApp<false> App;
    typedef uWS::TemplatedApp<true> SSLApp;

v20.67.0

24 Sep 06:18
Compare
Choose a tag to compare
  • Adds removeChildApp

v20.66.0

11 Sep 16:18
Compare
Choose a tag to compare

Minor HTTP corrections

  • Emit 431 on too many headers (not just too long headers)
  • Don't emit 505 on fragmented request line (regression since 505 was introduced)

v20.65.0

06 Aug 12:08
Compare
Choose a tag to compare
  • Always put a reason message on 1006 close events
  • Template refactors needed for coming HTTP cache; it should be entirely backwards compatible for your app

v20.64.0

03 Jul 19:06
933b984
Compare
Choose a tag to compare
  • uWebSockets is now 22% faster than simdutf in validating [mostly English] UTF-8.

v20.63.0

19 Jun 14:18
Compare
Choose a tag to compare
  • Make use of ERR_INVALID_CLOSE_PAYLOAD to better explain such closures.
  • Remove C-API as it is no longer maintained here, but rather over at the Bun repo.
  • It's invalid to pass nullptr to memcpy even with 0 size according to UndefinedBehaviorSanitizer, so this is now fixed.