Releases: centrifugal/centrifuge-dart
Releases · centrifugal/centrifuge-dart
Release list
v0.20.0
v0.19.1
v0.19.0
What's Changed
- Add
Client.close()— disconnects and releases all client resources (closes every event stream and removes every subscription). The client is unusable afterclose(); subsequent public method calls throwClientClosedError. UseClient.disconnect()for a temporary disconnect that keeps the client usable. #106 - Multiple connection stability fixes, see #106 for the full list. Highlights:
await client.disconnect()now actually waits for transport teardown before resolving.- Disconnect code
3014(connection state invalidated) and unsubscribe code2502(subscription state invalidated) now correctly clear the relevant token and recovery state, forcing a freshgetTokenon reconnect. - WebSocket close code
1009(message size limit) is now terminal (no auto-reconnect), matching the behavior in centrifuge-js. - Cancelling a subscription while its
SubscribeRequestis in flight now sends a cleanupUnsubscribeto the server, preventing a "ghost" server-side subscription that keeps pushing publications to the local sub. - Concurrent
unsubscribe()/disconnect during a subscribe round-trip can no longer flip the subscription state back toSubscribed. - Several smaller correctness fixes around connect-mutex resets, async error handling, ping-reply decoding, and the
ClientDisconnectedErrorthrown type.
- Wire
ClientConfig.tlsSkipVerifythrough to the WebSocket transport on VM/Flutter (dart:io) platforms — was a silent no-op before. Useful forwss://development against a self-signed cert. Web platforms ignore the flag, since the browser owns TLS validation. #107 - Substantially expand the integration test suite: server-initiated reconnection scenarios, extended stream recovery edge cases, client/subscription lifecycle ordering,
getTokenretries, and several race-condition tests, all running against the docker-compose Centrifugo.
Full Changelog: v0.18.0...v0.19.0
v0.18.0
v0.17.0
v0.16.0
v0.15.1
v0.15.0
What's Changed
- Update
web_socket_channel, min Dart SDK is now 3.3 #91 - Support headers emulation in web context - so it's possible to pass custom connection headers to the backend when using Centrifugo v6 and connect proxy. Also added
setHeadersmethod to update headers #92.
This release changes headers in ClientConfig from Map<String, dynamic> to Map<String, String>. This is a breaking change, but it must not cause huge troubles beyond a simple refactoring.
Usages of dart.html were removed in this release. Also some internal optimizations were done to allocate less when constructing Protobuf command data.
Full Changelog: v0.14.1...v0.15.0