socket.io-adapter-cluster
How to use
worker.js
const io = 3000;const clusterAdapter = ;io;
master.js
const cluster = ;const clusterAdapter = ;cluster;cluster;;
API
Adapter([opts])
The following opts
are allowed:
key
: the name of broadcast prefix, default(socket.io
)client
: the client of broadcast
Protocal
The socket.io-adapter-cluster
adapter broadcast with prefix:
prefix#namespace#
If broadcasting to a single room:
prefix#namespace#room#
Note
The socket.io-adapter-cluster
is a simple and cluster-version of socket.io-redis
.
LICENSE
MPL-2.0