public void PrepareRstStream(int streamId, Proto2ErrorCode errorCode) { PayloadLength = 4; Type = Proto2FrameType.RST_STREAM; Flags = 0; StreamId = streamId; RstStreamErrorCode = errorCode; }
public void PrepareGoAway(int lastStreamId, Proto2ErrorCode errorCode) { PayloadLength = 8; Type = Proto2FrameType.GOAWAY; Flags = 0; StreamId = 0; GoAwayLastStreamId = lastStreamId; GoAwayErrorCode = errorCode; }
internal void ResetAndAbort(ConnectionAbortedException abortReason, Proto2ErrorCode error) { // Future incoming frames will drain for a default grace period to avoid destabilizing the connection. var states = ApplyCompletionFlag(StreamCompletionFlags.Aborted); if (states.OldState == states.NewState) { return; } Log.Proto2StreamResetAbort(TraceIdentifier, error, abortReason); // Don't block on IO. This never faults. _ = _http2Output.WriteRstStreamAsync(error); AbortCore(abortReason); }
public void Proto2StreamResetAbort(string traceIdentifier, Proto2ErrorCode error, ConnectionAbortedException abortReason) { _http2StreamResetError(_logger, traceIdentifier, error, abortReason); }
public Proto2StreamErrorException(int streamId, string message, Proto2ErrorCode errorCode) : base($"HTTP/2 stream ID {streamId} error ({errorCode}): {message}") { StreamId = streamId; ErrorCode = errorCode; }
public Proto2ConnectionErrorException(string message, Proto2ErrorCode errorCode) : base($"HTTP/2 connection error ({errorCode}): {message}") { ErrorCode = errorCode; }