foundation-comms.socket.sendforstreamwithoutteardown
Home > @genesislcap/foundation-comms > Socket > sendForStreamWithoutTeardown
Socket.sendForStreamWithoutTeardown() method
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Sends a message and returns an observable that emits messages received from the server.
Signature:
sendForStreamWithoutTeardown<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
message |
Message<T | any> |
The message to send. |
|
onMessage |
Function |
The function to call when a message is received. |
|
onError |
Function |
The function to call when an error is received. |
Returns:
Observable<Message>
An observable that emits messages received from the server.