SocketClient class

Represents a WebSocket client.

The SocketClient class encapsulates a WebSocket connection and provides methods for sending data and closing the connection.

Constructors

SocketClient({required String id, required WebSocket socket, required WebRequest rq, required SocketManager manager})
Constructs a SocketClient instance with the specified parameters.

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier of this client.
getter/setter pair
manager SocketManager
The SocketManager instance managing this client.
getter/setter pair
rq WebRequest
The WebRequest that initiated the WebSocket connection.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socket WebSocket
The WebSocket connection associated with this client.
getter/setter pair

Methods

close() Future
Closes the WebSocket connection and removes the client from the session.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(dynamic data, {int status = 200, String? path}) Future
Sends data to the client via the WebSocket connection.
toString() String
A string representation of this object.
inherited

Operators

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