IDocumentDeltaConnection Interface
Packages > @fluidframework/driver-definitions > IDocumentDeltaConnection
Signature:
export interface IDocumentDeltaConnection extends IEventProvider<IDocumentDeltaConnectionEvents>
Extends: IEventProvider<IDocumentDeltaConnectionEvents>
Properties
Property | Type | Description |
---|---|---|
checkpointSequenceNumber | number | Last known sequence number to ordering service at the time of connection It may lap actual last sequence number (quite a bit, if container is very active). But it's best information for client to figure out how far it is behind, at least for "read" connections. "write" connections may use own "join" op to similar information, that is likely to be more up-to-date. |
claims | ITokenClaims | Claims for the client |
clientId | string | ClientID for the connection |
existing | boolean | Whether the connection was made to a new or existing document |
initialClients | ISignalClient[] | Prior clients already connected. |
initialContents | IContentMessage[] | Messages sent during the connection |
initialMessages | ISequencedDocumentMessage[] | Messages sent during the connection |
initialSignals | ISignalMessage[] | Signals sent during the connection |
maxMessageSize | number | Maximum size of a message that can be sent to the server. Messages larger than this size must be chunked. |
mode | ConnectionMode | Mode of the client |
parentBranch | string | null | The parent branch for the document |
serviceConfiguration | IServiceConfiguration | Configuration details provided by the service |
version | string | Protocol version being used with the service |
Methods
Method | Description |
---|---|
disconnect() | Disconnects the given delta connection |
emit(event, args) | Emits an event from this document delta connection |
listeners(event) | Gets the listeners for an event |
removeAllListeners() | Removes all listeners from all events |
submit(messages) | Submit a new message to the server |
submitAsync(message) | Async version of the regular submit function. |
submitSignal(message) | Submit a new signal to the server |
Events
checkpointSequenceNumber
Last known sequence number to ordering service at the time of connection It may lap actual last sequence number (quite a bit, if container is very active). But it’s best information for client to figure out how far it is behind, at least for “read” connections. “write” connections may use own “join” op to similar information, that is likely to be more up-to-date.
Signature:
checkpointSequenceNumber?: number;
claims
Claims for the client
Signature:
claims: ITokenClaims;
clientId
ClientID for the connection
Signature:
clientId: string;
existing
Whether the connection was made to a new or existing document
Signature:
existing: boolean;
initialClients
Prior clients already connected.
Signature:
initialClients: ISignalClient[];
initialContents
Messages sent during the connection
Signature:
initialContents: IContentMessage[];
initialMessages
Messages sent during the connection
Signature:
initialMessages: ISequencedDocumentMessage[];
initialSignals
Signals sent during the connection
Signature:
initialSignals: ISignalMessage[];
maxMessageSize
Maximum size of a message that can be sent to the server. Messages larger than this size must be chunked.
Signature:
maxMessageSize: number;
mode
Mode of the client
Signature:
mode: ConnectionMode;
parentBranch
The parent branch for the document
Signature:
parentBranch: string | null;
serviceConfiguration
Configuration details provided by the service
Signature:
serviceConfiguration: IServiceConfiguration;
version
Protocol version being used with the service
Signature:
version: string;
Methods
disconnect
Disconnects the given delta connection
Signature:
disconnect(): any;
Returns:
any
emit
Emits an event from this document delta connection
Signature:
emit(event: string, ...args: any[]): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
event | string | The event to emit |
args | any[] | The arguments for the event |
Returns:
boolean
listeners
Gets the listeners for an event
Signature:
listeners(event: string): Function[];
Parameters
Parameter | Type | Description |
---|---|---|
event | string | The name of the event |
Returns:
Function[]
removeAllListeners
Removes all listeners from all events
Signature:
removeAllListeners(): void;
Returns:
void
submit
Submit a new message to the server
Signature:
submit(messages: IDocumentMessage[]): void;
Parameters
Parameter | Type | Description |
---|---|---|
messages | IDocumentMessage[] |
Returns:
void
submitAsync
Async version of the regular submit function.
Signature:
submitAsync(message: IDocumentMessage[]): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
message | IDocumentMessage[] |
Returns:
Promise<void>
submitSignal
Submit a new signal to the server
Signature:
submitSignal(message: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
message | any |
Returns:
void