Skip to content

Releases: uNetworking/uWebSockets

v19.8.0

20 Sep 17:48
6393f97
Compare
Choose a tag to compare

Large messages & slow receivers

WebSockets are typically used for small message sending. In some cases you might end up with larger-than-ideal messages being sent, and these cases need to be handled efficiently. Especially if receivers are slow and backpressure is building up.

  • Only reduce backpressure in steps of 1/32th of the backpressure itself. This hinders excessive reallocation/shifting of especially large backpressure and improves drainage performance.

  • Use std::string::erase instead of std::string::substr. This alone is a 3x performance improvement for worst cases.

  • Write directly to backpressure if sending a large message, or if already draining. This improves sending performance of large messages as we avoid extra copying/allocations.

  • Adds ability to benchmark large message echoing with load_test. Use extra argument size_mb. This release is at least 1.5x the peformance when echoing 100mb messages.

v18.24.0

15 Sep 13:59
Compare
Choose a tag to compare
Add iterateRootTopics, update uSockets

v19.6.0

13 Sep 13:11
Compare
Choose a tag to compare

Reordering fix

v19.0.0a1 introduced a bug that broke the publishing ordering guarantees across topics.

v19.5.0

04 Sep 07:57
Compare
Choose a tag to compare

Boost Asio

Adding support for seamless integration with Boost Asio.

Compile with WITH_ASIO=1 and integrate with existing boost::asio::io_context on the same thread.

Caveat: Loop must be run by uWS (Loop::run() or us_loop_run) even if the io_context is third party.

v19.4.0

29 Aug 04:01
Compare
Choose a tag to compare

Stampede tweaks

  • Tweaks the TLS handshake queue to better cope with mass connections and mass disconnections.
  • Adjusts the WebSocket shutdown timeout from a default of 120 seconds to roughly 4 seconds, making mass disconnections finish quicker.

Please report any issues or undesired side effects introduced in this release.

v19.3.0

26 Jun 20:41
d94bf2c
Compare
Choose a tag to compare

Do not publish to self

  • Fixes a bug where publishing to all but self, still would publish to self (WebSocket::publish).
  • Adds test case for this issue.
  • Improves scale_test.
  • Fixes header install.
  • Fixes 4 GB HTTP stream limit on 32-bit platforms.

v19.2.0

13 Apr 12:21
b7c82d7
Compare
Choose a tag to compare

idleTimeout fix

  • Fixes bad (broken) ping timeout calculations for idleTimeout = 16, 32, 64, ...

v19.1.0

10 Apr 21:25
Compare
Choose a tag to compare

First fixes

  • Fixes compilation of WebSocket::isSubscribed, App::numSubscribers
  • WebSocket::iterateTopics returns topic names without initial slash ("/broadcast" is now returned as "broadcast").

v19.0.0

10 Apr 16:29
Compare
Choose a tag to compare

All versions below v19 are now deprecated. This is as usual - we only manage one branch and therefore it is important to upgrade. No fixes will be backported to deprecated versions. Don't worry - v19 is mostly backwards compatible with v18 except for a few key areas:

1. Ping and pong events now take std::string_view message [definitely breaking]

Any WebSocket ping or pong frame can carry a small message as payload. We never exposed that message to the library user until now. This means we break APIs a tiny bit. Look at the (updated) examples to see what I mean.

2. WebSocket::getUserData is now type safe [most probably backwards compatible]

The type of WebSocket<SSL, isServer> has changed to WebSocket<SSL, isServer, USERDATA> where USERDATA is what you specified in App::ws<USERDATA>, often times called PerSocketData. This was done to make WebSocket::getUserData() type safe instead of returning a void pointer. This change should be entirely backwards compatible for everyone using type inference (all examples do).

3. WebSocket::publish now sends to every subscriber except for itself [differing behavior]

Publishing using WebSocket::publish will now send to all subscribers in the whole App, except for to itself. If you want to send to all subscribers in the App, unconditionally, use App::publish. This change is potentially breaking, so check your usage - however - most users were expecting this behavior so this change will most likely fix things rather than break things.

4. Pings are now sent automatically if necessary to meet idleTimeout constraints [differing behavior]

Defaults regarding ping/pong have changed. Now the server will automatically send pings as needed, unless the client has sent us something recently. This is a change from v18 where all clients had the sole responsibility of sending the server something every once in a while to not time out. Yes, you can revert back to the old behavior via settings, but the new default is for the server to manage pings automatically - meaning that the entire heartbeat problematic is now entirely automatic by default - you don't need to consider it, it just works.

5. WebSocket::unsubscribeAll was removed [definitely breaking]

v19 adds new functions regarding pub/sub - such as WebSocket::iterateTopics. This means the rather specialized WebSocket::unsubscribeAll makes less sense now. Especially since the library automatically unsubscribes from all topics on socket close (more efficiently). So this function was removed in favor of more general functions.

v19.0.0 alpha 5

05 Mar 16:03
0b97cc7
Compare
Choose a tag to compare

Fuzzing fixes and API changes

Fuzzing is now without issues at roughly 97% coverage - higher than ever reported before. Some API changes - still some to be done.