TurboStreamSocketHandler class
Skeleton WebSocket handler that wires routed's built-in support to TurboStreamHub.
Constructors
-
TurboStreamSocketHandler({required TurboStreamHub hub, TurboTopicResolver? topicResolver, Future<
void> messageHandler(WebSocketContext context, dynamic message)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hub → TurboStreamHub
-
final
-
messageHandler
→ Future<
void> Function(WebSocketContext context, dynamic message)? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- topicResolver → TurboTopicResolver
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
WebSocketContext context) → Future< void> - Called when the WebSocket connection is closed.
-
onError(
WebSocketContext context, dynamic error) → Future< void> - Called when an error occurs on the WebSocket.
-
onMessage(
WebSocketContext context, dynamic message) → Future< void> - Called when a message is received on the WebSocket.
-
onOpen(
WebSocketContext context) → Future< void> - Called when a WebSocket connection is established.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited