- ⚡️ Update uSockets, fixing SSL builds
👍 Dedicated pub/sub compression support
👍 Pub/sub now supports the use of dedicated compressors, not only the shared one. We've supported dedicated compressors for regular WebSocket::send calls a long time, but now WebSocket::publish will provide the same compression ratios.
👍 A "dedicated" compressor is one with a sliding window, per-socket. This compressor provides better compression for small, mostly-repeated messages in exchange for per-socket memory usage.
A recommended dedicated compressor is the DEDICATED_COMPRESOR_3KB as it uses only 3KB per socket.
- App::getNativeHandle and AsyncSocket::getNativeHandle will return the SSL_CTX and SSL pointers, respectively. In the case of non-SSL, the file descriptor or nullptr will be returned.
- maxBackpressure is now applied to WebSocket::send, not only WebSocket::publish. This means any attempt at sending when having too much backpressure will be ignored, skipped, and return success. If you don't want this behavior either disable maxBackpressure or check getBufferedAmount before sending, manually.
- 📜 Minor corrections to PROXY parser
- Minor changes to unsubscribeAll while closing
Stricter pub/sub guarantees
We've had weird pub/sub behavior reported, caused by the fact that publish is deferred until the end of the event loop iteration. This means that subscribing after a publish may very well end up acting as if you subscribed before publishing, and the opposite for unsubscribe.
🔀 In most apps this won't make a difference but now there's stricter guarantees regarding when things happen. Publish still happens at the end of the event loop iteration, but will trigger earlier if needed to keep things in proper sync.
Seamless PROXY Protocol v2
🏗 Enabling WITH_PROXY during build allows seamless parsing of PROXY Protocol v2 and/or HTTP. There's no runtime configuration needed; the HTTP parser will automatically pick up on the presence of such a proxy (HAProxy for instance).
➕ Adds functions
⬆️ Upgrade events
- ⬆️ WebSocketBehavior now takes .upgrade handler for catching HTTP-to-WebSocket upgrade requests. This can be used to perform HTTP-level authentication before the HTTP connection is upgraded to WebSocket. Not everyone wants to, or can, authenticate via WebSocket messaging.
- ⬆️ As part of this addition, .open handler no longer takes HttpRequest. You may access HttpRequest in the .upgrade handler and pass data along to WebSocket, via its UserData.
- ➕ Adds UpgradeSync and UpgradeAsync examples showing these features.
- 👍 Shared compressor support for pub/sub (dedicated compressor planned).
- 👍 uSockets v0.4.0 brings support for BoringSSL, faster by 18% for sub 16kb messaging.
- Mark is now "17" rather than "v0.17" (we only expose major version either way).
- Always emit drain event in case of having no backpressure
- When publishing to a topic, sockets with high backpressure are now skipped rather than immediately closed
- Unsubscribing to a triggered Topic that's still alive as parent should clear it
- A+ score on LGTM
- 🚚 Moves to uSockets 0.3.5+ APIs
- Zero-length inflations are peculiar, yet valid
- Gracefully fail to listen if SSL cert/key was missing
- Store headers in bloom filter, respond to 100-continue
- 🛠 Fix router in regards to empty url segments