public async Task InitialHttp2StreamWindowSize_SentInSettingsFrame() { const int WindowSize = 123456; using Http2LoopbackServer server = Http2LoopbackServer.CreateServer(); using var handler = CreateHttpClientHandler(); GetUnderlyingSocketsHttpHandler(handler).InitialHttp2StreamWindowSize = WindowSize; using HttpClient client = CreateHttpClient(handler); Task <HttpResponseMessage> clientTask = client.GetAsync(server.Address); Http2LoopbackConnection connection = await server.AcceptConnectionAsync().ConfigureAwait(false); SettingsFrame clientSettingsFrame = await connection.ReadSettingsAsync().ConfigureAwait(false); SettingsEntry entry = clientSettingsFrame.Entries.First(e => e.SettingId == SettingId.InitialWindowSize); Assert.Equal(WindowSize, (int)entry.Value); }