Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SkipUnknownPayloadAsync()

async ValueTask System.Net.Http.Http3RequestStream.SkipUnknownPayloadAsync ( long payloadLength,
CancellationToken cancellationToken )
inlineprivate

Definition at line 947 of file Http3RequestStream.cs.

948 {
949 while (payloadLength != 0L)
950 {
951 if (_recvBuffer.ActiveLength == 0)
952 {
953 _recvBuffer.EnsureAvailableSpace(1);
954 int num = await _stream.ReadAsync(_recvBuffer.AvailableMemory, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
955 if (num == 0)
956 {
957 throw new Http3ConnectionException(Http3ErrorCode.FrameError);
958 }
959 _recvBuffer.Commit(num);
960 }
961 long num2 = Math.Min(payloadLength, _recvBuffer.ActiveLength);
962 _recvBuffer.Discard((int)num2);
964 }
965 }
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)

References System.Net.Http.Http3RequestStream._recvBuffer, System.Net.Http.Http3RequestStream._stream, System.cancellationToken, System.L, System.Math.Min(), and System.Net.Quic.QuicStream.ReadAsync().

Referenced by System.Net.Http.Http3RequestStream.ReadFrameEnvelopeAsync().