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

◆ WriteToStreamAsync()

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

Definition at line 2167 of file HttpConnection.cs.

2168 {
2169 if (System.Net.NetEventSource.Log.IsEnabled())
2170 {
2171 Trace($"Writing {source.Length} bytes.", "WriteToStreamAsync");
2172 }
2173 if (async)
2174 {
2175 return _stream.WriteAsync(source);
2176 }
2177 _stream.Write(source.Span);
2178 return default(ValueTask);
2179 }
Task WriteAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:914
void Write(byte[] buffer, int offset, int count)
override void Trace(string message, [CallerMemberName] string memberName=null)
static readonly System.Net.NetEventSource Log

References System.Net.Http.HttpConnection._stream, System.Net.NetEventSource.Log, System.source, System.Net.Http.HttpConnection.Trace(), System.IO.Stream.Write(), and System.IO.Stream.WriteAsync().

Referenced by System.Net.Http.HttpConnection.FlushAsync(), System.Net.Http.HttpConnection.FlushThenWriteWithoutBufferingAsync(), System.Net.Http.HttpConnection.WriteAsync(), System.Net.Http.HttpConnection.WriteByteSlowAsync(), System.Net.Http.HttpConnection.WriteBytesSlowAsync(), and System.Net.Http.HttpConnection.WriteWithoutBufferingAsync().