ChannelManager class

Routes incoming messages to registered WebSocketTopics and wraps outgoing messages in the topic envelope format.

Envelope format (JSON string over the wire):

{"topic": "room:lobby", "event": "new_message", "payload": {...}}

Constructors

ChannelManager({required Future<void> rawSend(dynamic)})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

channel(String topic) WebSocketTopic
Returns (creating if necessary) the WebSocketTopic for topic.
dispose() Future<void>
getStats() Map<String, dynamic>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
route(WebSocketMessage message) bool
Tries to route message to a registered topic.
toString() String
A string representation of this object.
inherited

Operators

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