Skip to content

v2.3.0-beta

Choose a tag to compare

@uesleibros uesleibros released this 05 May 22:46
· 310 commits to main since this release
07b6c12

Wasabi v2.3.0-beta

Added

  • MQTT QoS 2 (Exactly Once): Implemented the complete four-way acknowledgment handshake (PUBREC, PUBREL, PUBCOMP). The internal MqttInFlight queue now fully supports QoS 2, ensuring critical messages are never duplicated or lost, clearing them only when the final PUBCOMP confirmation arrives.
  • Offline Queueing: Added WebSocketSetOfflineQueueing. When enabled, messages (Text, Binary, and MQTT Publishes) sent while the socket is disconnected are safely buffered in secondary memory queues. Once the AutoReconnect subsystem restores the connection, all buffered messages are automatically flushed to the server in their exact original order.
  • Ping Jitter: Enhanced WebSocketSetPingInterval with a new jitterMaxMs parameter. This introduces pseudo-random variance to automatic keepalive pings, effectively bypassing strict anti-bot gateways that disconnect clients with perfectly robotic heartbeat timings.

Changed

  • Dynamic Buffer Initialization: Heavily optimized AllocConnection to initialize recvBuffer, DecryptBuffer, and FragmentBuffer at a lightweight 4KB instead of their maximum limits. Buffers now grow elastically on demand, saving approximately ~750KB of static RAM per newly allocated connection handle.
  • Strict UTF-8 Enforcement: Replaced all legacy StrConv(..., vbFromUnicode) calls with the native StringToUtf8 function during WebSocket and HTTP Proxy handshakes. This guarantees strict RFC compliance and prevents payload corruption on systems with non-ANSI localizations.

Fixed

  • Zlib Decompression Overflow: Fixed a silent failure in InflatePayload where highly compressed incoming payloads (like massive JSONs) exceeded the static output buffer allocation. The function now dynamically expands the buffer in 16KB chunks using Z_BUF_ERROR checks until decompression is fully complete.
  • Close Frame Integer Overflow: Rewrote the status code bit-shifting logic in ProcessCloseFrame to use 32-bit math (CLng), preventing fatal VBA overflow crashes if a server transmits a malformed close code where the first byte exceeds 127.
  • VBA Scoping Conflicts: Fixed a compilation error caused by duplicate Dim j As Long declarations inside MqttReceive due to VBA's function-level scoping limitations.

Notes

  • This beta introduces enterprise-level connection resilience designed for unstable networks, complex bot gateways, and high-stakes MQTT broadcasting.
  • Testing: Verified in 32-bit/64-bit Office environments. The complete MQTT QoS 2 lifecycle (Publish, Receive, and Full Acknowledgment) was verified against EMQX public brokers.