code: function Endpoint(log, role, settings, filters) {
    Duplex.call(this);
  
    // * Initializing logging infrastructure
    this._log = log.child({ component: 'endpoint', e: this });
  
    // * First part of the handshake process: sending and receiving the client connection header
    //   prelude.
    assert((role === 'CLIENT') || role === 'SERVER');
    if (role === 'CLIENT') {
      this._writePrelude();
    } else {
      this._readPrelude();
    }
  
    // * Initialization of component. This includes the second part of the handshake process:
    //   sending the first SETTINGS frame. This is done by the connection class right after
    //   initialization.
    this._initializeDataFlow(role, settings, filters || {});
  
    // * Initialization of management code.
    this._initializeManagement();
  
    // * Initializing error handling.
    this._initializeErrorHandling();
  }
docs: Constructor ----------- The process of initialization: