docs: function Client (config) {
    this.config = clone(config) || {};
  
    // Sort out defaults.
    this.config.id = this.config.id || "client-" + Math.floor(Math.random() * 100000);
    this.config.log = this.config.log || {};
    this.config.log.level = this.config.log.level || "debug";
    this.config.sockets = this.config.sockets || {};
    this.config.sockets.defaultNamespace = this.config.sockets.defaultNamespace || "";
    this.config.sockets.defaultTimeout = this.config.sockets.defaultTimeout || 500;
  
    // Default and necessary client socket configuration. These values must
    // override whatever (if anything) is supplied in a socket connect
    // action.
    //
    // Suppressing autoconnect is necessary to give time to alter the client
    // socket instance before the connection occurs.
    //
    // The first socket connection on a page should force a new connection,
    // which is what would happen in a browser, but here the sockets are by
    // default kept around, which is an issue.
    this.socketConfig = {
      "auto connect": false,
      "force new connection": false
    };
    this.firstSocketConfig = {
      "auto connect": false,
      "force new connection": true
    };
  
    // Create a log.
    this.log = new Log(this.config.id, this.config.log.level);
  
    // Set up cookies, data, etc.
    this.clear();
  }