Dart (Flutter) client SDK for bidirectional communication with Centrifugo and Centrifuge-based server over WebSocket
Full Changelog: https://github.com/centrifugal/centrifuge-dart/compare/v0.9.2...v0.9.3
Breaking changes
This release adopts a new iteration of Centrifugal protocol and a new iteration of API. Client now behaves according to the client SDK API specification. The work has been done according to Centrifugo v4 roadmap.
Check out Centrifugo v4 release post that covers the reasoning behind changes.
All the current core features of Centrifugal client protocol are now supported here.
New release only works with Centrifugo >= v4.0.0 and Centrifuge >= 0.25.0. See Centrifugo v4 migration guide for details about the changes in the ecosystem.
Note, that Centrifugo v4 supports clients working over the previous protocol iteration, so you can update Centrifugo to v4 without any changes on the client side (but you need to turn on use_client_protocol_v1_by_default
option in the configuration of Centrifugo, see Centrifugo v4 migration guide for details).
Version 0.8.0 is the next iteration of centrifuge-dart
development. It pushes client closer to other clients in the ecosystem. It also contains several backwards incompatible changes.
Client.connect
, Client.disconnect
, Subscription.subscribe
, Subscription.unsubscribe
methods - addresses #31.DisconnectEvent
on connection error - this makes behavior of centrifuge-dart
similar to all other our clients - addresses #56.ErrorEvent
- each transport failure will emit error to this stream - addresses #56.subscribing
and error
statuses. This change is mostly internal should not affect working with Subscriptions.UnsubscribeEvent
if subscription is not successfully subscribed (i.e. in subscribed
state). This makes behavior of centrifuge-dart
similar to all other our clients.Client.Disconnect
method - make it more similar to all other connector libraries in ecosystem.TimeoutException
. Also - properly pass timeout to the transport (was not before!). Again – this makes client behave similarly to all other connectors.presence
and presenceStats
methods for Subscription and on client top level (for server-side subscriptions).streamPosition
in SubscribeSuccessEvent
.streamPosition
in ServerSubscribeEvent
.data
in ServerSubscribeEvent
.send
method to send async messages to a server.data
in SubscribeSuccessEvent
. This is a custom data which can be sent by a server towards client connection in subscribe result. Note that due to the bug in Centrifugo server this feature only works in Centrifugo >= v3.0.3.Update to work with Centrifuge >= v0.18.0 and Centrifugo v3.
Breaking change in server behavior. Client History API behavior changed in Centrifuge >= v0.18.0 and Centrifugo >= v3.0.0. When using history call it won't return all publications in a stream by default. See Centrifuge v0.18.0 release notes or Centrifugo v3 migration guide for more information and workaround on server-side.
limit
, since
and reverse
arguments and returns HistoryResult
PublishResult
?format=protobuf
in connection URL. Client will negotiate Protobuf protocol with a server using WebSocket subprotocol mechanism (in request headers).