locksmith-connector-ws
v0.3.1
Published
WebSocket connector for locksmith
Downloads
9
Readme
locksmith-connector-ws
WebSocket connector for locksmith
Usage
npm install locksmith-connector-ws --save
Server
import { WebSocketServerConnector } from 'locksmith-connector-ws';
let connector = new WebSocketServerConnector({
port: 23482
});
connector.start('metadata');
Client
import { WebSocketClientConnector } from 'locksmith-connector-ws';
let connector = new WebSocketClientConnector(new WebSocket('ws://localhost:23482'));
connector.start('metadata'); // Metadata can be any JSON object