Skip to main content
Version: v1

IConnected Interface

Message sent to indicate a client has connected to the server

Signature

export interface IConnected

Properties

PropertyModifiersTypeDescription
checkpointSequenceNumberoptionalnumberLast 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.
claimsITokenClaimsClaims for the client
clientIdstringThe client who is sending the message
epochoptionalstringRepresents the version of document at server.
existingbooleanWhether or not this is an existing document
initialClientsISignalClient[]Prior clients already connected.
initialMessagesISequencedDocumentMessage[]Messages sent during the connection
initialSignalsISignalMessage[]Signals sent during the connection
maxMessageSizenumberMaximum size of a message before chunking is required
modeConnectionModeConnection mode of client.
nonceoptionalstringAn optional nonce used during connection to identify connection attempts
relayServiceAgentoptionalstringProperties that server can send to client to tell info about node that client is connected to. For ex, for spo it could contain info like build version, environment, region etc. These properties can be logged by client to better understand server environment etc. and use it in case error occurs. Format: "prop1:val1;prop2:val2;prop3:val3"
serviceConfigurationIClientConfigurationConfiguration details provided by the service
supportedFeaturesoptionalRecord<string, any>A list of optional features that ordering service supports. Features supported might be service specific. If we have standardized features across all services, they need to be exposed in more structured way.
supportedVersionsstring[]List of protocol versions supported by the server
timestampoptionalnumberThe time the client connected
versionstringProtocol version selected by the server to communicate with the client

Property Details

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;

Type: number

claims

Claims for the client

Signature

claims: ITokenClaims;

Type: ITokenClaims

clientId

The client who is sending the message

Signature

clientId: string;

Type: string

epoch

Represents the version of document at server.

Signature

epoch?: string;

Type: string

existing

Whether or not this is an existing document

Signature

existing: boolean;

Type: boolean

initialClients

Prior clients already connected.

Signature

initialClients: ISignalClient[];

Type: ISignalClient[]

initialMessages

Messages sent during the connection

Signature

initialMessages: ISequencedDocumentMessage[];

Type: ISequencedDocumentMessage[]

initialSignals

Signals sent during the connection

Signature

initialSignals: ISignalMessage[];

Type: ISignalMessage[]

maxMessageSize

Maximum size of a message before chunking is required

Signature

maxMessageSize: number;

Type: number

mode

Connection mode of client.

Signature

mode: ConnectionMode;

Type: ConnectionMode

nonce

An optional nonce used during connection to identify connection attempts

Signature

nonce?: string;

Type: string

relayServiceAgent

Properties that server can send to client to tell info about node that client is connected to. For ex, for spo it could contain info like build version, environment, region etc. These properties can be logged by client to better understand server environment etc. and use it in case error occurs. Format: "prop1:val1;prop2:val2;prop3:val3"

Signature

relayServiceAgent?: string;

Type: string

serviceConfiguration

Configuration details provided by the service

Signature

serviceConfiguration: IClientConfiguration;

Type: IClientConfiguration

supportedFeatures

A list of optional features that ordering service supports. Features supported might be service specific. If we have standardized features across all services, they need to be exposed in more structured way.

Signature

supportedFeatures?: Record<string, any>;

Type: Record<string, any>

supportedVersions

List of protocol versions supported by the server

Signature

supportedVersions: string[];

Type: string[]

timestamp

The time the client connected

Signature

timestamp?: number;

Type: number

version

Protocol version selected by the server to communicate with the client

Signature

version: string;

Type: string