solver-workshop / ws-center

:calling: A distributed WebSocket Server with high level abstractions and HTTP APIs

Home Page:https://solver-workshop.github.io/ws-center

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ws-center

Build Status

A distributed WebSocket server with high level abstractions and HTTP APIs, based on socket.io and its redis adapter.

API Documentation

https://solver-workshop.github.io/ws-center

How to use

Server

Change the configurations in /config folder, and deploy this application.

Client

Clients can use socket.io client to communicate with the server.

const SocketClient = require('socket.io-client')

const client = SocketClient('http://localhost:9001', {
  query: { userId: id },
  path: '/ws'
})

client.on('message', function (body) {
  // ...
})

client.on('connect', function () {
  // ...
})

About

:calling: A distributed WebSocket Server with high level abstractions and HTTP APIs

https://solver-workshop.github.io/ws-center

License:MIT License


Languages

Language:JavaScript 99.1%Language:Dockerfile 0.9%