docs: function WebSocketTransport(config) {
    this.id = config && config.id || null;
    this.networkId = this.id || null;
    this['default'] = config && config['default'] || false;
    this.localShortcut = (config && config.localShortcut === false) ? false : true;
    this.reconnectDelay = config && config.reconnectDelay || 10000;
  
    this.httpTransport = config && config.httpTransport;
  
    this.url = config && config.url || null;
    this.server = null;
  
    if (this.url != null) {
      var urlParts = urlModule.parse(this.url);
  
      if (urlParts.protocol != 'ws:') throw new Error('Invalid protocol, "ws:" expected');
      if (this.url.indexOf(':id') == -1) throw new Error('":id" placeholder missing in url');
  
      this.address = urlParts.protocol + '//' + urlParts.host; // the url without path, for example 'ws://localhost:3000'
      this.ready = this._initServer(this.url);
    }
    else {
      this.address = null;
      this.ready = Promise.resolve(this);
    }
  
    this.agents = {}; // WebSocketConnections of all registered agents. The keys are the urls of the agents
  }