Example #1
0
 public void Http3StreamAbort(string traceIdentifier, Http3ErrorCode error, ConnectionAbortedException abortReason)
 {
     if (_http3Logger.IsEnabled(LogLevel.Debug))
     {
         Http3StreamAbort(_http3Logger, traceIdentifier, Http3Formatting.ToFormattedErrorCode(error), abortReason);
     }
 }
Example #2
0
 public void Http3FrameSending(string connectionId, long streamId, Http3RawFrame frame)
 {
     if (_http3Logger.IsEnabled(LogLevel.Trace))
     {
         Http3FrameSending(_http3Logger, connectionId, Http3Formatting.ToFormattedType(frame.Type), streamId, frame.Length);
     }
 }
Example #3
0
 public void Http3FrameReceived(string connectionId, long streamId, Http3RawFrame frame)
 {
     if (_logger.IsEnabled(LogLevel.Trace))
     {
         _http3FrameReceived(_logger, connectionId, Http3Formatting.ToFormattedType(frame.Type), streamId, frame.Length, null);
     }
 }
        public async Task ControlStream_ClientToServer_UnexpectedFrameType_ConnectionError(string frameType)
        {
            await Http3Api.InitializeConnectionAsync(_noopApplication);

            var controlStream = await Http3Api.CreateControlStream();

            var f = Enum.Parse <Http3FrameType>(frameType);
            await controlStream.SendFrameAsync(f, Memory <byte> .Empty);

            await Http3Api.WaitForConnectionErrorAsync <Http3ConnectionErrorException>(
                ignoreNonGoAwayFrames : true,
                expectedLastStreamId : 0,
                expectedErrorCode : Http3ErrorCode.UnexpectedFrame,
                expectedErrorMessage : CoreStrings.FormatHttp3ErrorUnsupportedFrameOnControlStream(Http3Formatting.ToFormattedType(f)));
        }
 public Http3ConnectionErrorException(string message, Http3ErrorCode errorCode)
     : base($"HTTP/3 connection error ({Http3Formatting.ToFormattedErrorCode(errorCode)}): {message}")
 {
     ErrorCode = errorCode;
 }