@lykkex/subzero
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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

Dependencies (0)

    Dev Dependencies (9)

    Package Sidebar

    Install

    npm i @lykkex/subzero

    Weekly Downloads

    4

    Version

    0.0.4

    License

    ISC

    Unpacked Size

    15.1 kB

    Total Files

    17

    Last publish

    Collaborators

    • lugrugzo
    • lykkex-corp
    • andrey.zhylin
    • koroelvs