docs: function(seedlist, options) {
    options = options || {};
  
    // Get replSet Id
    this.id = id++;
  
    // Internal state
    this.s = {
      options: Object.assign({}, options),
      // 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
        ]),
      // Factory overrides
      Cursor: options.cursorFactory || BasicCursor,
      // Logger instance
      logger: Logger('Mongos', options),
      // Seedlist
      seedlist: seedlist,
      // Ha interval
      haInterval: options.haInterval ? options.haInterval : 10000,
      // Disconnect handler
      disconnectHandler: options.disconnectHandler,
      // Server selection index
      index: 0,
      // Connect function options passed in
      connectOptions: {},
      // Are we running in debug mode
      debug: typeof options.debug === 'boolean' ? options.debug : false,
      // localThresholdMS
      localThresholdMS: options.localThresholdMS || 15,
      // Client info
      clientInfo: createClientInfo(options)
    };
  
    // Set the client info
    this.s.options.clientInfo = createClientInfo(options);
  
    // Log info warning if the socketTimeout < haInterval as it will cause
    // a lot of recycled connections to happen.
    if (
      this.s.logger.isWarn() &&
      this.s.options.socketTimeout !== 0 &&
      this.s.options.socketTimeout < this.s.haInterval
    ) {
      this.s.logger.warn(
        f(
          'warning socketTimeout %s is less than haInterval %s. This might cause unnecessary server reconnections due to socket timeouts',
          this.s.options.socketTimeout,
          this.s.haInterval
        )
      );
    }
  
    // Disconnected state
    this.state = DISCONNECTED;
  
    // Current proxies we are connecting to
    this.connectingProxies = [];
    // Currently connected proxies
    this.connectedProxies = [];
    // Disconnected proxies
    this.disconnectedProxies = [];
    // Index of proxy to run operations against
    this.index = 0;
    // High availability timeout id
    this.haTimeoutId = null;
    // Last ismaster
    this.ismaster = null;
  
    // Description of the Replicaset
    this.topologyDescription = {
      topologyType: 'Unknown',
      servers: []
    };
  
    // Highest clusterTime seen in responses from the current deployment
    this.clusterTime = null;
  
    // Add event listener
    EventEmitter.call(this);
  }