@@ -32,7 +32,7 @@ The following options are allowed:
3232- ` key ` : the name of the key to pub/sub events on as prefix (` socket.io ` )
3333- ` host ` : host to connect to redis on (` localhost ` )
3434- ` port ` : port to connect to redis on (` 6379 ` )
35- - ` subEvent ` : optional, the redis client event name to subscribe to (` message ` )
35+ - ` subEvent ` : optional, the redis client event name to subscribe to (` messageBuffer ` )
3636- ` pubClient ` : optional, the redis client to publish events on
3737- ` subClient ` : optional, the redis client to subscribe to events on
3838- ` requestsTimeout ` : optional, after this timeout the adapter will stop waiting from responses to request (` 1000ms ` )
@@ -42,12 +42,6 @@ If you decide to supply `pubClient` and `subClient`, make sure you use
4242[ node_redis] ( https://github.com/mranney/node_redis ) as a client or one
4343with an equivalent API.
4444
45- If you supply clients, make sure you initialized them with
46- the ` return_buffers ` option set to ` true ` .
47-
48- You can supply [ ioredis] ( https://github.com/luin/ioredis ) as a client
49- by providing ` messageBuffer ` as the subEvent option.
50-
5145### RedisAdapter
5246
5347The redis adapter instances expose the following properties
@@ -89,12 +83,10 @@ a connection string.
8983var redis = require (' redis' ).createClient ;
9084var adapter = require (' socket.io-redis' );
9185var pub = redis (port, host, { auth_pass: " pwd" });
92- var sub = redis (port, host, { return_buffers : true , auth_pass: " pwd" });
86+ var sub = redis (port, host, { auth_pass: " pwd" });
9387io .adapter (adapter ({ pubClient: pub, subClient: sub }));
9488```
9589
96- Make sure the ` return_buffers ` option is set to ` true ` for the sub client.
97-
9890## Protocol
9991
10092The ` socket.io-redis ` adapter broadcasts and receives messages on particularly named Redis channels. For global broadcasts the channel name is:
0 commit comments