ws
Description
Creates a socket.io websocket client wrapped in an Observable. The Observable is a vanilla RxJS Observable which emits actions and exposes its API using [rxws operators]((https://brianbuccaneer.gitbook.io/rxws/api/operators).
Usage
API
Since
1.0
Parameters
url<String>
: The URL of the Websocket server
Options
topics[<String>]
: An array of the topics to which the WebSocket client should subscribe. Defaults to['message']
.socketOptions
: An object containing socket.io client options.
Returns
Observable
. An RxJS Observable. This contains a stream of events. The websocket is intended to be used with rxws operators.
Last updated