index.js
function Handshake(context, options) {
  if (!this) return new Handshake(context, options);

  options = options || {};

  this.stringify = options.stringify || qs.stringify;
  this.configure = Object.create(null);
  this.timers = new Tick(context);
  this.id = options.id || v4;
  this.context = context;
  this.payload = {};

  this.timeout = 'handshake timeout' in options
    ? options['handshake timeout']
    : '5 seconds';

  this.update();
}
function Handshake(context, options) {
  if (!this) return new Handshake(context, options);

  options = options || {};

  this.stringify = options.stringify || qs.stringify;
  this.configure = Object.create(null);
  this.timers = new Tick(context);
  this.id = options.id || v4;
  this.context = context;
  this.payload = {};

  this.timeout = 'handshake timeout' in options
    ? options['handshake timeout']
    : '5 seconds';

  this.update();
}
function Handshake ( context , options ) { if ( ! this ) return new Handshake ( context , options ) ; options = options || { } ; this . stringify = options . stringify || qs . stringify ; this . configure = Object . create ( null ) ; this . timers = new Tick ( context ) ; this . id = options . id || v4 ; this . context = context ; this . payload = { } ; this . timeout = 'handshake timeout' in options ? options [ 'handshake timeout' ] : '5 seconds' ; this . update ( ) ; }
Handle handshakes.

Options:

- `handshake timeout`: Maximum time you're allowed to spend modifying the
handshake.
- `stringify`: Encoder for the complete handshake response.
- `id`: Unique id generator.

@constructor
@param {Mixed} context Context of the callbacks.
@param {Object} options Optional configuration.
@api public
Handle handshakes .