test/ioredis.js
// create a pair of socket.io server+client
create a pair of socket.io server+client
create a pair of socket . io server + client
function create(nsp, fn){
    var srv = http();
    var sio = io(srv);
    sio.adapter(adapter({
      pubClient: redis(),
      subClient: redis(null, null, { return_buffers: true }),
      subEvent: 'messageBuffer'
    }));
    srv.listen(function(err){
      if (err) throw err; 
      if ('function' == typeof nsp) {
        fn = nsp;
        nsp = '';
      }
      nsp = nsp || '/';
      var addr = srv.address();
      var url = 'http://localhost:' + addr.port + nsp;
      fn(sio.of(nsp), ioc(url));
    });
  }
function create ( nsp , fn ) { var srv = http ( ) ; var sio = io ( srv ) ; sio . adapter ( adapter ( { pubClient : redis ( ) , subClient : redis ( null , null , { return_buffers : true } ) , subEvent : 'messageBuffer' } ) ) ; srv . listen ( function ( err ) { if ( err ) throw err ; if ( 'function' == typeof nsp ) { fn = nsp ; nsp = '' ; } nsp = nsp || '/' ; var addr = srv . address ( ) ; var url = 'http://localhost:' + addr . port + nsp ; fn ( sio . of ( nsp ) , ioc ( url ) ) ; } ) ; }
create a pair of socket.io server+client
create a pair of socket . io server + client
// abort tests