Simple, secure & standards compliant web server for the most demanding of applications
APACHE-2.0 License
Bot releases are visible (Hide)
Published by about 3 years ago
Adds uWS::CompressOptions::DEDICATED_DECOMPRESSOR. This (decompressor) flag can be OR:ed with one (compressor) flag to easily create a complete compression preference such as:
.compression = uWS::CompressOptions(uWS::DEDICATED_COMPRESSOR_4KB | uWS::DEDICATED_DECOMPRESSOR),
See https://github.com/uNetworking/uWebSockets/issues/1347. This change is backwards compatible. More specific decompressors will be added with time.
Published by about 3 years ago
Published by about 3 years ago
Adds wider TopicTree fuzz testing and fixes first v20 bug.
Published by about 3 years ago
Pub/sub is now a lot more predictable and always guarantees strict ordering inside topics, across topics and between WebSocket::send and WebSocket::publish / App::publish. Subscription and unsubscription is always guaranteed to be strictly ordered with respect to publish. Support for MQTT wildcards has been removed.
Unless you're relying on MQTT wildcards ('#', '+'), v20.0.0 is entirely backwards compatible with v19.9.0.
When pub/sub was introduced in 2018, it was designed based on a few assumptions:
Published by about 3 years ago
Fixes a bug applicable to the new publish-to-all-except-self feature in v19 (WebSocket::publish).
Published by about 3 years ago
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.
Published by about 3 years ago
Published by about 3 years ago
v19.0.0a1 introduced a bug that broke the publishing ordering guarantees across topics.
Published by about 3 years ago
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.
Published by about 3 years ago
Please report any issues or undesired side effects introduced in this release.
Published by over 3 years ago
Published by over 3 years ago
Published by over 3 years ago
Published by over 3 years ago
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:
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.
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).
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.
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.
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.
Published by over 3 years ago
Fuzzing is now without issues at roughly 97% coverage - higher than ever reported before. Some API changes - still some to be done.
Published by over 3 years ago
Published by over 3 years ago
Published by over 3 years ago
Adds new option "sendPingsAutomatically" and changes a few defaults to more sane values in respect to simplicity. With these defaults you no longer have to bother with timeouts or pings but can put all focus on business logic.
Published by over 3 years ago
One of the most requested features since pub/sub was added. WebSocket::publish will no longer publish to itself, even if subscribed to the topic being published to. App::publish remains like before and will publish to any matching subscriber.
Published by over 3 years ago
Adds a new option resetIdleTimeoutOnSend, set to true by default for backwards compatibility with old behavior. You can set this to false in case you only want data receives to reset idleTimeout for your WebSockets (which is probably the most sane value).
The Linux kernel defaults to a TCP retransmission timeout of 15 minutes, meaning that with resetIdleTimeoutOnSend not set to false can postpone the detection of broken sockets by, well 15 minutes. This can be way too long if your idleTimeout is somewhere around 120 seconds.
TLDR; If your idleTimeout is quite short and you have a stable stream of data flowing to the server, you probably want to set resetIdleTimeoutOnSend = false.
This release also fixes a timeout bug in drain event of WebSockets