SocketIoChannel class final

A RealtimeChannel over socket.io.

Implemented types

Properties

closed → Future<RealtimeClosed>
Completes once when the session ends (never with an error).
no setteroverride
events → Stream<FreedomeEvent>
Events of subscribed topics, in arrival order.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
kind → RealtimeTransport
The transport kind.
no setteroverride
resyncs → Stream<WsResync>
resync notices (gap too old / server restart / overflow).
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsCalls → bool
Whether call is supported (plain WS and socket.io; not GraphQL-WS).
no setteroverride
welcome → WsWelcome?
Server welcome (null for transports without one).
no setteroverride

Methods

call(String op, {Map<String, String> params = const {}, Object? body, String? ifMatch, String? id, Duration? timeout}) → Future<RealtimeResult>
Calls REST operation op over the socket (envelope id = idempotency key id).
override
close([int? code, String? reason]) → Future<void>
Closes the session (idempotent).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subscribe(List<String> topics, {int? sinceSeq, double? positionHz}) → Future<WsSubscribeResult>
Subscribes to topic filters (MQTT wildcards), optionally resuming after sinceSeq.
override
toString() → String
A string representation of this object.
inherited
unsubscribe(List<String> topics) → Future<void>
Unsubscribes topic filters.
override

Operators

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

Static Methods

open(FreedomeEndpoint endpoint, RealtimeHello hello, {Duration timeout = const Duration(seconds: 10), FreedomeLogger? logger}) → Future<SocketIoChannel>
Connects to <endpoint>/v1 (path /socket.io/) and waits for the namespace connect.