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

◆ WriteRequestContentAsync()

async ValueTask System.Net.Http.Http3RequestStream.WriteRequestContentAsync ( ReadOnlyMemory< byte > buffer,
CancellationToken cancellationToken )
inlineprivate

Definition at line 446 of file Http3RequestStream.cs.

447 {
448 if (buffer.Length == 0)
449 {
450 return;
451 }
454 {
456 {
457 string net_http_content_write_larger_than_content_length = System.SR.net_http_content_write_larger_than_content_length;
458 throw new IOException(net_http_content_write_larger_than_content_length, new HttpRequestException(net_http_content_write_larger_than_content_length));
459 }
462 {
464 _gatheredSendBuffer[0] = _sendBuffer.ActiveMemory;
467 _sendBuffer.Discard(_sendBuffer.ActiveLength);
469 }
470 else
471 {
473 }
474 }
475 else
476 {
478 _gatheredSendBuffer[0] = _sendBuffer.ActiveMemory;
481 _sendBuffer.Discard(_sendBuffer.ActiveLength);
482 }
483 }
void BufferFrameEnvelope(Http3FrameType frameType, long payloadLength)
readonly ReadOnlyMemory< byte >[] _gatheredSendBuffer
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
static string net_http_content_write_larger_than_content_length
Definition SR.cs:186
Definition SR.cs:7

References System.Net.Http.Http3RequestStream._gatheredSendBuffer, System.Net.Http.Http3RequestStream._requestContentLengthRemaining, System.Net.Http.Http3RequestStream._sendBuffer, System.Net.Http.Http3RequestStream._singleDataFrameWritten, System.Net.Http.Http3RequestStream._stream, System.buffer, System.Net.Http.Http3RequestStream.BufferFrameEnvelope(), System.cancellationToken, System.SR.net_http_content_write_larger_than_content_length, and System.Net.Quic.QuicStream.WriteAsync().

Referenced by System.Net.Http.Http3RequestStream.Http3WriteStream.WriteAsync().