Websocket class

Inheritance

Constructors

Websocket(String name, {ResourcesClient? client, WebsocketClient? websocketClient, WebsocketHandlerClient? websocketHandlerClient})

Properties

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

Methods

asRequest() → ResourceDeclareRequest
override
closeConnection(String connectionId) Future<void>
Close a connection to the socket, referenced by its connectionId.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onConnect(WebsocketHandler handler) Future<void>
Set a handler for connection requests to the socket.
onDisconnect(WebsocketHandler handler) Future<void>
Set a handler for disconnection requests to the socket.
onMessage(WebsocketHandler handler) Future<void>
Set a handler for messages to the socket.
register() Future<void>
Register the resource with the Nitric server. Handles shutting down the channel.
inherited
sendMessage(String connectionId, String data) Future<void>
Send message data to a connection, referenced by its connectionId.
toString() String
A string representation of this object.
inherited

Operators

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