Session class

One connection's worth of Kick's Centrifugo protocol. Each method returns the actions to carry out: {"action": "send", "text": ...}, {"action": "close", "code", "reason", "terminal", "retry_after_ms"} (close the socket, call closed, wait Backoff.nextDelayFor(retry_after_ms, random) and reconnect, with a new client id if terminal: never stop for good on one, docs/KICK.md §6.1), refresh_token (fetch a token for the same client id and pass it to refresh; if that fails, carry on: Kick ends the connection when the old token runs out), connected, subscribed, unsubscribed, subscribe_failed, event. subscribed for the chat feed (the first of Realtime.chatChannels) is when to call Backoff.reset. Times are milliseconds.

Constructors

Session(List<String> channels)

Properties

deadline → int?
no setter
hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

closed() → List<Json>
dispose() → void
Frees the native session now rather than when this is collected.
isSubscribed(String channel) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String token, int now) → List<Json>
receive(String text, int now) → List<Json>
refresh(String token, int now) → List<Json>
tick(int now) → List<Json>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited