code: function HybridConnectionsWebSocketServer(options, callback) {
    if (this instanceof HybridConnectionsWebSocketServer === false) {
      return new HybridConnectionsWebSocketServer(options, callback);
    }
  
    EventEmitter.call(this);
  
    options = Object.assign({
      server: null,
      token: null,
      id: null,
      verifyClient: null,
      handleProtocols: null,
      disableHixie: false,
      clientTracking: true,
      perMessageDeflate: true,
      maxPayload: 100 * 1024 * 1024,
      backlog: null // use default (511 as implemented in net.js)
    }, options);
  
    if (!isDefinedAndNonNull(options, 'server')) {
      throw new TypeError('\'server\' must be provided');
    }
  
    if (!isDefinedAndNonNull(options, 'token')) {
      throw new TypeError('A \'token\' string or function must be provided');
    }
  
    var self = this;
  
    this.listenUri = options.server;
    if (isDefinedAndNonNull(options, 'id')) {
      this.listenUri = listenUri + '&id=' + options.id;
    }
  
    this.closeRequested = false;
    this.options = options;
    this.path = options.path;
    this.clients = [];
  
    connectControlChannel(this);
  }
docs: WebSocket Server implementation