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

◆ SetupAsync()

async ValueTask System.Net.Http.Http2Connection.SetupAsync ( )
inline

Definition at line 1806 of file Http2Connection.cs.

1807 {
1808 try
1809 {
1810 _outgoingBuffer.EnsureAvailableSpace(s_http2ConnectionPreface.Length + 9 + 6 + 9 + 4);
1811 s_http2ConnectionPreface.AsSpan().CopyTo(_outgoingBuffer.AvailableSpan);
1813 FrameHeader.WriteTo(_outgoingBuffer.AvailableSpan, 12, FrameType.Settings, FrameFlags.None, 0);
1814 _outgoingBuffer.Commit(9);
1816 _outgoingBuffer.Commit(2);
1818 _outgoingBuffer.Commit(4);
1820 _outgoingBuffer.Commit(2);
1822 _outgoingBuffer.Commit(4);
1823 uint value = 67043329u;
1824 if (System.Net.NetEventSource.Log.IsEnabled())
1825 {
1826 Trace($"Initial connection-level WINDOW_UPDATE, windowUpdateAmount={value}", "SetupAsync");
1827 }
1828 FrameHeader.WriteTo(_outgoingBuffer.AvailableSpan, 4, FrameType.WindowUpdate, FrameFlags.None, 0);
1829 _outgoingBuffer.Commit(9);
1831 _outgoingBuffer.Commit(4);
1834 _outgoingBuffer.Discard(_outgoingBuffer.ActiveLength);
1835 _expectingSettingsAck = true;
1836 }
1837 catch (Exception innerException)
1838 {
1839 Dispose();
1841 }
1844 }
static void WriteUInt32BigEndian(Span< byte > destination, uint value)
static void WriteUInt16BigEndian(Span< byte > destination, ushort value)
Task WriteAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:914
System.Net.ArrayBuffer _outgoingBuffer
static readonly byte[] s_http2ConnectionPreface
readonly HttpConnectionPool _pool
override void Trace(string message, [CallerMemberName] string memberName=null)
static readonly System.Net.NetEventSource Log
static string net_http_http2_connection_not_established
Definition SR.cs:150
Definition SR.cs:7
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.Net.Http.Http2Connection._expectingSettingsAck, System.Net.Http.HttpConnectionSettings._initialHttp2StreamWindowSize, System.Net.Http.Http2Connection._outgoingBuffer, System.Net.Http.Http2Connection._pool, System.Net.Http.Http2Connection._rttEstimator, System.Net.Http.Http2Connection._stream, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Net.Http.Http2Connection.Dispose(), System.Net.NetEventSource.Log, System.SR.net_http_http2_connection_not_established, System.Net.Http.Http2Connection.RttEstimator.OnInitialSettingsSent(), System.Net.Http.Http2Connection.ProcessIncomingFramesAsync(), System.Net.Http.Http2Connection.ProcessOutgoingFramesAsync(), System.Net.Http.Http2Connection.s_http2ConnectionPreface, System.Net.Http.HttpConnectionPool.Settings, System.Net.Http.Http2Connection.Trace(), System.value, System.IO.Stream.WriteAsync(), System.Net.Http.Http2Connection.FrameHeader.WriteTo(), System.Buffers.Binary.BinaryPrimitives.WriteUInt16BigEndian(), and System.Buffers.Binary.BinaryPrimitives.WriteUInt32BigEndian().