2.1.0 • Published 1 year ago

@krknet/socket-server v2.1.0

Weekly downloads
7
License
ISC
Repository
-
Last release
1 year ago

SocketServer

Wrapper around Socket.io

Usage

const SocketServer = require('@krknet/socket-server')
const socketServer = new SocketServer(httpServer.rawServer, { initiatiors: [] })
global.__sockets = socketServer

await socketServer.start()
console.log(socketServer.isRunning)
await socketServer.stop()

Client Path: node_modules/socket.io/client-dist/socket.io.js Production Client Path: node_modules/socket.io/client-dist/socket.io.min.js

Options

{
  initiatiors: [],
  doLog: true,
  path: '/ws'
}

Functions

async start ()

emit (...params)

of (ns)

in (room)

to (recipient)

async stop ()
2.1.0

1 year ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago