foundation-comms.connect.stream
Home > @genesislcap/foundation-comms > Connect > stream
Connect.stream() method
Starts listening for updates on the specified resource.
Signature:
stream(resourceName: string, onMessage: Function, onError: Function, params?: DataserverParams): SocketObservable<Message>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
resourceName |
string |
The name of the resource to listen for updates on. |
|
onMessage |
Function |
A callback function to handle received messages. |
|
onError |
Function |
A callback function to handle errors. |
|
params |
(Optional) Additional parameters to pass to the server. |
Returns:
An observable that emits messages received from the server.