Creates a new TopicClient instance
The socket client instance
Optional
options: Partial<IBaseClientOptions>Options
Gets the client ID
Gets a promise that resolves with a topic channel's value (waits for a value before resolving)
A promise that resolves with the topic channel's value
The channel to get the value of
The timeout for the request (in ms)
Gets a topic channel's current value
The current value of the topic channel
Error if the channel is not a topic channel, not found, or not valid
The channel to get the value of
Publishes a new value to a topic channel by broadcasting the diff between the current value and the new value
The channel to publish to
The new value
Whether to call the client's own topic subscribers
Whether to publish deletions of topic properties (not recommended if multiple clients are publishing to the same topic with overlapping properties)
Optional
source: stringOptional source of the update (Only used on TopicServer for broadcasting / forwarding messages)
Publishes a raw diff to a topic channel by broadcasting the diff
The channel to publish to
The diff to publish
Whether to call the client's own topic subscribers
Optional
source: stringOptional source of the update (Only used on TopicServer for broadcasting / forwarding messages)
Sends a service request to the specified destination
A promise that resolves with the response
The channel to send the request on
The destination to send the request to
Optional
serviceData: TThe data to send
Optional
timeout: numberThe timeout for the request (in ms)
Resets a topic channel's value to an empty object
The channel to reset
Serves a service channel by registering a handler function
The channel object
The handler function to call when a service is requested
Subscribes to the changes of a topic channel
The unsubscriber function
The channel object
The handler function to call when the topic changes
Whether to immediately call the handler with the current topic value when subscribing
Subscribes to connection status changes
A function to unsubscribe from the connection status changes
The listener function
Subscribes to the changes of a topic channel once (convenience function)
The unsubscriber function
The channel object
The handler function to call when the topic changes
Whether to immediately call the handler with the current topic value when subscribing
Unsubscribes from connection status changes
The listener function
Generated using TypeDoc
Client class that will be used to connect to a TopicServer