RealtimeClient class Null safety


RealtimeClient(String endPoint, {WebSocketChannel transport(String url, Map<String, String> headers)?, void encode(dynamic payload, void callback(String result))?, void decode(String payload, void callback(dynamic result))?, Duration timeout = Constants.defaultTimeout, int heartbeatIntervalMs = 30000, int longpollerTimeout = 20000, TimerCalculation? reconnectAfterMs, void logger(String? kind, String? msg, dynamic data)?, Map<String, String> params = const {}, Map<String, String>? headers})
Initializes the Socket [...]


channels List<RealtimeSubscription>
read / write
conn WebSocketChannel?
read / write
connState ↔ SocketStates?
read / write
decode ↔ void Function(String payload, void callback(dynamic result))
read / write
encode ↔ void Function(dynamic payload, void callback(String result))
read / write
endPoint String
hashCode int
The hash code for this object. [...]
read-only, inherited
headers Map<String, String>
heartbeatIntervalMs int
read / write
heartbeatTimer Timer?
read / write
logger ↔ (void Function?(String? kind, String? msg, dynamic data)?)
read / write
longpollerTimeout int
read / write
params Map<String, String>
pendingHeartbeatRef String?
read / write
reconnectAfterMs ↔ TimerCalculation
read / write
reconnectTimer ↔ RetryTimer
read / write
ref int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sendBuffer List
read / write
stateChangeCallbacks Map<String, List<Function>>
read / write
timeout Duration
transport WebSocketChannel Function(String url, Map<String, String> headers)


channel(String topic, {Map<String, dynamic> chanParams = const {}}) RealtimeSubscription
connect() → void
Connects the socket.
connectionState() String
Returns the current state of the socket.
disconnect({Function? callback, int? code, String? reason}) → void
Disconnects the socket with status code and reason for the disconnect
endPointURL() String
Returns the URL of the websocket.
isConnected() bool
Retuns true is the connection is open.
log([String? kind, String? msg, dynamic data]) → void
Logs the message. Override this.logger for specialized logging.
makeRef() String
Return the next message ref, accounting for overflows
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
onClose(dynamic callback(dynamic)) → void
Registers a callbacks for connection state change events.
onConnMessage(String rawMessage) → void
onError(dynamic callback(dynamic)) → void
Registers a callbacks for connection state change events.
onMessage(dynamic callback(dynamic)) → void
Calls a function any time a message is received.
onOpen(Function callback) → void
Registers callbacks for connection state change events [...]
push(Message message) → void
remove(RealtimeSubscription channel) → void
Removes a subscription from the socket.
sendHeartbeat() → void
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]