Пример #1
0
        /// <summary>
        /// Exposed Used for testing only! Default values used in the initial settings frame are overridden intentionally
        /// for testing but violate the RFC if used outside the scope of testing.
        /// </summary>
        /// <param name="maxHeaderListSize"></param>
        /// <param name="maxHeaderTableSize"></param>
        internal HpackDecoder(long maxHeaderListSize, int maxHeaderTableSize)
        {
            if ((ulong)(maxHeaderListSize - 1L) > SharedConstants.TooBigOrNegative64)
            {
                ThrowHelper.ThrowArgumentException_Positive(maxHeaderListSize, ExceptionArgument.maxHeaderListSize);
            }
            _maxHeaderListSize = maxHeaderListSize;

            _maxDynamicTableSize = _encoderMaxDynamicTableSize = maxHeaderTableSize;
            _maxDynamicTableSizeChangeRequired = false;
            _hpackDynamicTable = new HpackDynamicTable(maxHeaderTableSize);
        }
Пример #2
0
        /// <summary>
        /// Exposed Used for testing only! Default values used in the initial settings frame are overridden intentionally
        /// for testing but violate the RFC if used outside the scope of testing.
        /// </summary>
        /// <param name="maxHeaderListSize"></param>
        /// <param name="maxHeaderTableSize"></param>
        internal HpackDecoder(long maxHeaderListSize, int maxHeaderTableSize)
        {
            if (maxHeaderListSize <= 0L)
            {
                ThrowHelper.ThrowArgumentException_Positive(maxHeaderListSize, ExceptionArgument.maxHeaderListSize);
            }
            _maxHeaderListSize = maxHeaderListSize;

            _maxDynamicTableSize = _encoderMaxDynamicTableSize = maxHeaderTableSize;
            _maxDynamicTableSizeChangeRequired = false;
            _hpackDynamicTable = new HpackDynamicTable(maxHeaderTableSize);
        }