@uncut/hotel

1.0.1 • Public • Published

Room based WebSocket Manager

import { Connection, MessageHandler } from '@uncut/hotel';
import WebSocket from 'ws';

// create a ws websocket server
const wss = new WebSocket.Server({ port: 8080 });

// create a message handler
const handler = new MessageHandler();

/* and a connection for the ws server 
   and the message handler */
const con = new Connection(wss, handler);

Readme

Keywords

none

Package Sidebar

Install

npm i @uncut/hotel

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

7.78 kB

Total Files

11

Last publish

Collaborators