Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Unfortunately, MsgPack is required in my project so I couldn't use the answer listed here.</p> <p>Instead, I found this page: <a href="https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO" rel="nofollow">https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO</a></p> <p>Which led me to these code changes.</p> <p>Previously I had:</p> <pre><code>redis = require('redis'), redisPub = redis.createClient(), redisSub = redis.createClient(), redisClient = redis.createClient(), RedisStore = require('connect-redis')(express), sessionStore = new RedisStore({ client: redisClient }), socketRedisStore = require('socket.io/lib/stores/redis'), socketRedis = require('socket.io/node_modules/redis'), ... io.configure(function() { io.set('log level', 1); io.set('store', new socketRedisStore({ redisPub: redisPub, redisSub: redisSub, redisClient: redisClient })); io.set('authorization', function(data, accept) { ... </code></pre> <p>Into this:</p> <pre><code>redis = require('redis'), redisPub = redis.createClient(), redisSub = redis.createClient(null, null, {detect_buffers: true}), redisClient = redis.createClient(), RedisStore = require('connect-redis')(express), sessionStore = new RedisStore({ client: redisClient }), socketRedisStore = require('socket.io/lib/stores/redis'), socketRedis = require('socket.io/node_modules/redis'), ... io.configure(function() { io.set('log level', 1); io.set('store', new socketRedisStore({ redis: redis, redisPub: redisPub, redisSub: redisSub, redisClient: redisClient })); io.set('authorization', function(data, accept) { ... </code></pre> <p>Note the inclusion of the options in the redisSub, to detect buffers, and then the injection of the base redis object into the socket.io store configuration.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload