Skip to main content

Stream subscription made by an application.

Properties (4)

Property Type Default Required Description
requestArguments⚓︎ object x

Arguments used to make the subscription.

serverInstance⚓︎ Instance x x
servers⚓︎ Instance[] x

Instances of the applications providing the stream, that we have subscribed to

stream⚓︎ MethodDefinition x

Stream definition.

5 Methods

close()⚓︎

() => void

Closes the subscription.

onClosed()⚓︎

(callback: (info: OnClosedInfo) => void) => void

Subscribe for the event which fires when the subscription is closed.

Parameters (1)

Name Type Required Description
callback⚓︎ (info: OnClosedInfo) => void x

onConnected()⚓︎

(callback: (server: Instance, reconnect: boolean) => void) => void

Subscribe for the event which your subscription is connected to a server

Parameters (1)

Name Type Required Description
callback⚓︎ (server: Instance, reconnect: boolean) => void x

onData()⚓︎

(callback: (data: StreamData) => void) => void

Subscribe for the event which fires when new data is received.

Parameters (1)

Name Type Required Description
callback⚓︎ (data: StreamData) => void x

onFailed()⚓︎

(callback: (err: any) => void) => void

Subscribe for the event which fires if the subscription fails.

Parameters (1)

Name Type Required Description
callback⚓︎ (err: any) => void x