@thorium-sim/lockstep-connector-ws
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

locksmith-connector-ws

WebSocket connector for @thorium-sim/lockstep

Usage

npm install @thorium-sim/lockstep-connector-ws --save

Server

import { WebSocketServerConnector } from '@thorium-sim/lockstep-connector-ws';
let connector = new WebSocketServerConnector({
  port: 23482,
});
connector.start({});

Client

import { WebSocketClientConnector } from '@thorium-sim/lockstep-connector-ws';
let connector = new WebSocketClientConnector(
  new WebSocket('ws://localhost:23482')
);
connector.start({}); // Metadata can be any JSON object

Dependencies (1)

Dev Dependencies (7)

Package Sidebar

Install

npm i @thorium-sim/lockstep-connector-ws

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

73.6 kB

Total Files

16

Last publish

Collaborators

  • alexanderson1993