CRDTSocketClient class abstract
Interface for the CRDT client
- Implementers
Constructors
-
CRDTSocketClient({List<
ClientSyncPlugin> ? plugins, DocumentCapabilities? capabilities}) -
Creates a client, with
pluginsattached to it.
Properties
-
The peer ID
no setter
- capabilities → DocumentCapabilities
-
What this build tells the server it can read.
no setter
-
connectionStatus
→ Stream<
ConnectionStatus> -
Stream of connection status changes between client and server.
no setter
- connectionStatusValue → ConnectionStatus
-
The current connection status. ConnectionStatus.disconnected until the
first move.
no setter
- document → CRDTDocument
-
The local CRDT document
no setter
-
faults
→ Stream<
SyncFault> -
What the client could not do with something the server sent.
no setter
- handshake → HandshakeGate
-
The handshake of the current connection attempt.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- incompatibility → SyncIncompatibility?
-
Why the server refused this build, or
nullwhile it has not.no setter - isUnsupported → bool
-
Whether the server has refused this build.
no setter
- lastFault → SyncFault?
-
The last fault, or
nullwhile there has been none.no setter -
messages
→ Stream<
Message> -
Stream of incoming server messages
no setter
-
plugins
→ List<
ClientSyncPlugin> -
The client plugins
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String?
-
The session ID
no setter
- statedCapabilities → SyncCapabilities?
-
capabilities as the peer states them, or
nullwhen they claim nothing.no setter
Methods
-
closeClientStreams(
) → void -
Ends faults and connectionStatus. Call it from
dispose. -
connect(
) → Future< bool> - Connect the client to the server
-
disconnect(
) → Future< void> - Disconnect the client from the server
-
dispose(
) → void - Dispose the client
-
handleErrorMessage(
ErrorMessage message) → void - Acts on an ErrorMessage the peer sent, for the codes every client answers the same way.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refuseBuild(
{required String code, required String reason}) → void - The server refused this build: stop for good.
-
refuseServerProtocolMismatch(
int serverVersion) → bool - Refuses a server that speaks another Protocol.protocolVersion, and says whether it did.
-
reportSyncFault(
SyncFault fault) → void -
Reports
faulton faults and latches it on lastFault. -
requestSync(
) → Future< void> - Request a sync message from the server
-
sendChange(
Change change) → Future< void> -
Send a
Changeto the server -
sendMessage(
Message message) → Future< void> - Send a Message to the server
-
toString(
) → String -
A string representation of this object.
inherited
-
updateConnectionStatus(
ConnectionStatus status) → void -
Moves the client to
status, and publishes it when it is a move.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited