예제 #1
0
        void VerifySettingsFrame()
        {
            VerifyNotProcessingHeaders();
            VerifyPayloadLength(_payloadLength);
            if (_streamId != 0)
            {
                ThrowHelper.ThrowConnectionError_AStreamIDMustBeZero();
            }

            if (_flags.Ack() && _payloadLength > 0)
            {
                ThrowHelper.ThrowConnectionError_AckSettingsFrameMustHaveAnEmptyPayload();
            }

            if (_payloadLength % Http2CodecUtil.SettingEntryLength > 0)
            {
                ThrowHelper.ThrowConnectionError_InvalidFrameLength(_payloadLength);
            }
        }