@lykkex/subzero

Socket-connection is abstract class over different realization of web socket connection.

Stats

StarsIssuesVersionUpdatedCreatedSize
@lykkex/subzero
0.0.43 years ago3 years agoMinified + gzip package size for @lykkex/subzero in KB

Readme

Socket connection

Socket-connection is abstract class over different realization of web socket connection.

Installing

yarn add @lykkex/subzero
npm i @lykkex/subzero

Usage

import {WampConnection} from '@lykkex/subzero-wamp';
import {IConnectionOptions} from 'autobahn';
import {SocketConnection} from '@lykkex/subzero';

const options: IConnectionOptions = {};
const wampProxy = new WampConnection(options);
const socket = new SocketConnection(wampProxy);

Methods

connect

Create connection using proxy passed to constructor

close

Close connection of proxy

isConnected

Return boolean whether connection is opened or closed

send

Send message to proxy

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.