Creates a new instance of WebsocketConnection.
The WebSocket connection object representing the connection to the client.
Optional
supportsCache: booleanDetermines whether the client supports caching for outbound data.
Optional
authToken: stringAn optional parameter used to store authentication credentials, such as session tokens, for the client.
Unique client id per server instance. This incremental value is resetted once the process is restarted.
Private
cachingReadonly
clientInformation about the client connected to the WebSocket.
Private
closedProtected
connectionThe WebSocket connection object representing the connection to the client.
Describes the clients auth state
Private
loggingPrivate
outboundPrivate
outboundPrivate
pingCan be used to store session credentials.
Static
Private
AUTO_Static
Private
closeStatic
Private
lookupStatic
routerRefers to a websocket router instance.
Gets the ID of the WebSocket connection.
True if the connection has been closed
True if outbound caching is supported by the client.
Calculates the modified rows of data, that have been changed since the last time data was cached.
The method of the associated Outbound.
The data returned from the outbound function.
Optional
isPartial: booleanTrue when a part of the data is only present
the data changes (inserted, updated, deleted)
Outbound request config is used to store the length of entries, that have been previously requested by this client for partially sent outbounds.
The method of the outbound
the outbound request config
Private
initializeProtected
onPrivate
onProtected
onPrivate
prepareSends a message through the WebSocket connection.
The method of the message.
The value of the message.
Optional
messageId: numberThe ID of the message.
Optional
specificHash: numberThe specific hash value - used by outbounds with caching enabled.
Optional
inserted: any[]Optional
updated: any[]Optional
deleted: any[]Optional
length: numberPrivate
sendOutbound request config is used to store the length of entries, that have been previously requested by this client for partially sent outbounds.
The method of the outbound
The length of entries that have been requested.
Updates the cached outbound data for the associated outbound method.
The method of the associated Outbound.
The contents that have been added since the last time.
The contents that have been modified since the last time.
The contents that have been removed since the last time.
Static
addAdds a close handler to be called when the connection is closed.
The callback function to be called on connection close.
Static
Protected
getGenerated using TypeDoc
Represents a WebSocket connection.