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

◆ WriteAsync()

async ValueTask System.Net.Http.HttpConnection.WriteAsync ( ReadOnlyMemory< byte > source,
bool async )
inlineprivate

Definition at line 1931 of file HttpConnection.cs.

1932 {
1933 int num = _writeBuffer.Length - _writeOffset;
1934 if (source.Length <= num)
1935 {
1937 return;
1938 }
1939 if (_writeOffset != 0)
1940 {
1941 WriteToBuffer(source.Slice(0, num));
1942 source = source.Slice(num);
1944 }
1945 if (source.Length >= _writeBuffer.Length)
1946 {
1948 }
1949 else
1950 {
1952 }
1953 }
ValueTask WriteToStreamAsync(ReadOnlyMemory< byte > source, bool async)
ValueTask FlushAsync(bool async)
void WriteToBuffer(ReadOnlySpan< byte > source)
ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)
Definition ValueTask.cs:312

References System.Net.Http.HttpConnection._writeBuffer, System.Net.Http.HttpConnection._writeOffset, System.Threading.Tasks.ValueTask< TResult >.ConfigureAwait(), System.Net.Http.HttpConnection.FlushAsync(), System.source, System.Net.Http.HttpConnection.WriteToBuffer(), and System.Net.Http.HttpConnection.WriteToStreamAsync().

Referenced by System.Net.Http.HttpConnection.ChunkedEncodingWriteStream.WriteAsync().