WebSocketConnection class

A class that represents a WebSocket connection using the Centrifuge client library.

This class provides a way to create and manage a WebSocket connection to a Centrifuge server using the Centrifuge package. It also provides a static init method that initializes a new WebSocket instance and connects it to the server.

Constructors

WebSocketConnection(Client client)
Creates a new WebSocketConnection instance with the given client.
const

Properties

client → Client
Getter for the Centrifuge client instance used by this WebSocketConnection.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

init({required String jwtToken, required String websocketServerURL}) Future<WebSocketConnection>
Initializes a new WebSocketConnection instance and connects it to the server using the given jwtToken.