WebSocketClient class
CRDTSocketClient implementation using web socket
- Inheritance
-
- Object
- CRDTSocketClient
- WebSocketClient
Constructors
-
WebSocketClient({required String url, required CRDTDocument document, required PeerId author, Compressor? compressor, MessageCodec<
Message> ? messageCodec, List<ClientSyncPlugin> ? plugins}) - Constructor
-
WebSocketClient.test({required String url, required CRDTDocument document, required PeerId author, required Transport transportFactory(), Compressor? compressor, MessageCodec<
Message> ? messageCodec, List<ClientSyncPlugin> ? plugins}) - Constructor for testing
Properties
-
Author of the document
final
-
connectionStatus
→ Stream<
ConnectionStatus> -
Stream of connection status changes between client and server
no setteroverride
- connectionStatusValue → ConnectionStatus
-
The current connection status
no setteroverride
- document → CRDTDocument
-
The local CRDT document
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
messages
→ Stream<
Message> -
Stream of incoming server messages
no setteroverride
-
plugins
→ List<
ClientSyncPlugin> -
The client plugins
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String?
-
The session ID
no setteroverride
- url → String
-
WebSocket server URL
final
Methods
-
connect(
) → Future< bool> -
Connect to the server
override
-
disconnect(
) → Future< void> -
Disconnect the client from the server
override
-
dispose(
) → void -
Dispose the client
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestSync(
) → Future< void> -
Request a sync message from the server
override
-
sendChange(
Change change) → Future< void> -
Send a
Changeto the serveroverride -
sendMessage(
Message message, {bool attemptReconnect = true}) → Future< void> -
Send a message to the server
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited