constructor()

in src/tlsconnection.js [64:77]


  constructor(psk, pskId, sendCallback) {
    this.psk = assertIsBytes(psk);
    this.pskId = assertIsBytes(pskId);
    this.connected = new Promise((resolve, reject) => {
      this._onConnectionSuccess = resolve;
      this._onConnectionFailure = reject;
    });
    this._state = new STATE.UNINITIALIZED(this);
    this._handshakeRecvBuffer = null;
    this._hasSeenChangeCipherSpec = false;
    this._recordlayer = new RecordLayer(sendCallback);
    this._keyschedule = new KeySchedule();
    this._lastPromise = Promise.resolve();
  }