docs: function(options) {
    options = options || {};
  
    // Add event listener
    EventEmitter.call(this);
  
    // Server instance id
    this.id = id++;
  
    // Internal state
    this.s = {
      // Options
      options: options,
      // Logger
      logger: Logger('Server', options),
      // Factory overrides
      Cursor: options.cursorFactory || BasicCursor,
      // BSON instance
      bson:
        options.bson ||
        new BSON([
          BSON.Binary,
          BSON.Code,
          BSON.DBRef,
          BSON.Decimal128,
          BSON.Double,
          BSON.Int32,
          BSON.Long,
          BSON.Map,
          BSON.MaxKey,
          BSON.MinKey,
          BSON.ObjectId,
          BSON.BSONRegExp,
          BSON.Symbol,
          BSON.Timestamp
        ]),
      // Pool
      pool: null,
      // Disconnect handler
      disconnectHandler: options.disconnectHandler,
      // Monitor thread (keeps the connection alive)
      monitoring: typeof options.monitoring === 'boolean' ? options.monitoring : true,
      // Is the server in a topology
      inTopology: !!options.parent,
      // Monitoring timeout
      monitoringInterval:
        typeof options.monitoringInterval === 'number' ? options.monitoringInterval : 5000,
      // Topology id
      topologyId: -1,
      compression: { compressors: createCompressionInfo(options) },
      // Optional parent topology
      parent: options.parent
    };
  
    // If this is a single deployment we need to track the clusterTime here
    if (!this.s.parent) {
      this.s.clusterTime = null;
    }
  
    // Curent ismaster
    this.ismaster = null;
    // Current ping time
    this.lastIsMasterMS = -1;
    // The monitoringProcessId
    this.monitoringProcessId = null;
    // Initial connection
    this.initialConnect = true;
    // Default type
    this._type = 'server';
    // Set the client info
    this.clientInfo = createClientInfo(options);
  
    // Max Stalleness values
    // last time we updated the ismaster state
    this.lastUpdateTime = 0;
    // Last write time
    this.lastWriteDate = 0;
    // Stalleness
    this.staleness = 0;
  }