testing 2

v1.18.x
barisusakli 11 years ago
parent cbe3b5b6dc
commit e00124007f

@ -27,11 +27,22 @@ var io;
Sockets.init = function(server) {
var RedisStore = require('socket.io/lib/stores/redis'),
redis = require('redis'),
pub = redis.createClient(),
sub = redis.createClient(),
client = redis.createClient();
io = socketioWildcard(SocketIO).listen(server, {
log: false,
transports: ['websocket', 'xhr-polling', 'jsonp-polling', 'flashsocket'],
'browser client minification': true,
resource: nconf.get('relative_path') + '/socket.io'
resource: nconf.get('relative_path') + '/socket.io',
'store' : new RedisStore({
redisPub : pub,
redisSub : sub,
redisClient : client
}),
});
Sockets.server = io;
@ -284,9 +295,11 @@ Sockets.isUsersOnline = function(uids, callback) {
return s.uid;
});
callback(null, uids.map(function(uid) {
var data = uids.map(function(uid) {
return sockets.indexOf(parseInt(uid, 10)) !== -1;
}));
});
callback(null, data);
};
Sockets.updateRoomBrowsingText = updateRoomBrowsingText;

Loading…
Cancel
Save