constructor (
    server,
    chunker,
    { disableLosslessIntegers, useBigInt } = {},
    createResponseHandler = () => null,
    log,
    onProtocolError
  ) {
    this._server = server || {}
    this._chunker = chunker
    this._packer = this._createPacker(chunker)
    this._unpacker = this._createUnpacker(disableLosslessIntegers, useBigInt)
    this._responseHandler = createResponseHandler(this)
    this._log = log
    this._onProtocolError = onProtocolError
    this._fatalError = null
    this._lastMessageSignature = null
    this._config = { disableLosslessIntegers, useBigInt }
  }
@constructor
@param {Object} server the server informatio.
@param {Chunker} chunker the chunker.
@param {Object} packstreamConfig Packstream configuration
@param {boolean} packstreamConfig.disableLosslessIntegers if this connection should convert all received integers to native JS numbers.
@param {boolean} packstreamConfig.useBigInt if this connection should convert all received integers to native BigInt numbers.
@param {CreateResponseHandler} createResponseHandler Function which creates the response handler
@param {Logger} log the logger
@param {OnProtocolError} onProtocolError handles protocol errors