RelayClientSession class

Relay client session on server.

Implements the relay protocol on top of ClientSession: the session persists pushed change blobs in the RelayStore and serves the room state on join, without ever interpreting CRDT data.

Inheritance

Constructors

RelayClientSession({required String id, required TransportConnection connection, required RelayStore store, required RelayCompactionCoordinator compaction, Compressor? compressor, MessageCodec<Message>? messageCodec, int? maxBufferSize, List<ServerSyncPlugin> plugins = const []})
Relay client session on server.

Properties

clientAuthor → PeerId?
The client peer ID, if the client already joined a room.
no setter
events Stream<SessionEvent>
Session events stream
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Session ID
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subscribedDocuments List<String>
The documents the client is subscribed to
no setterinherited

Methods

addSessionEvent(SessionEvent event) → void
Emit a SessionEvent on events.
inherited
close() Future<void>
Close the session
inherited
dispose() → void
Dispose the session
inherited
handleTypedMessage(Message message) Future<void>
Handle a protocol message, after plugin dispatch.
override
handleUndecodable(List<int> data) → void
Called for an incoming data frame no codec could decode.
override
isSubscribedTo(String documentId) bool
Check if the client is subscribed to documentId
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerDocument(String documentId, {bool notifyPlugins = true}) → void
Mark this session as subscribed to documentId.
inherited
sendMessage(Message message) Future<void>
Send a message to the client
inherited
toString() String
A string representation of this object.
inherited

Operators

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