disconnections
Description
Usage
import { share } from 'rxjs/operators';
import { ws, disconnections } from '@bottlenose/rxws';
const websocketParams = {url: 'wss://mysite.com'};
const ws$ = ws(websocketParams).pipe(share()); // create a websocket Subject
const disconnection$ = ws$.pipe(
disconnections()
);
disconnection$.subscribe(() => console.log('You have disconnected from the server!'));
// This would log events whenever the client connects to the serverAPI
disconnections()Since
Parameters
Options
Returns
Last updated