2.1.0 • Published 2 years ago

@krknet/socket-server v2.1.0

Weekly downloads
7
License
ISC
Repository
-
Last release
2 years 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

2 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago