function authenticateSocket(options, socket, method) {
            return new Promise(function(resolve, reject) {
              socket.once('unauthorized', reject);
              socket.once('authenticated', resolve);

              socket[method]('authenticate', options);
            });
          }
// Returns a promise that authenticates a socket
Returns a promise that authenticates a socket
Returns a promise that authenticates a socket
function authenticateSocket(options, socket, method) {
            return new Promise(function(resolve, reject) {
              socket.once('unauthorized', reject);
              socket.once('authenticated', resolve);
              socket[method]('authenticate', options);
            });
          }
function authenticateSocket ( options , socket , method ) { return new Promise ( function ( resolve , reject ) { socket . once ( 'unauthorized' , reject ) ; socket . once ( 'authenticated' , resolve ) ; socket [ method ] ( 'authenticate' , options ) ; } ) ; }
Returns a promise that authenticates a socket
Returns a promise that authenticates a socket