1 write to _connection
InMemory.FunctionalTests (1)
Http2\Http2TestBase.cs (1)
494_connection = new Http2Connection(httpConnectionContext);
82 references to _connection
InMemory.FunctionalTests (82)
Http2\Http2ConnectionTests.cs (61)
36_connection.ServerSettings.MaxConcurrentStreams = 2; 195Assert.Equal(1, _connection.StreamPool.Count); 252Assert.Equal(1, _connection.StreamPool.Count); 253Assert.True(_connection.StreamPool.TryPeek(out var stream1)); 270Assert.Equal(1, _connection.StreamPool.Count); 271Assert.True(_connection.StreamPool.TryPeek(out var stream2)); 371Assert.Equal(1, _connection.StreamPool.Count); 414Assert.Equal(0, _connection.StreamPool.Count); 418var stream = _connection._streams[1]; 425Assert.Equal(1, _connection.StreamPool.Count); 441Assert.Equal(0, _connection.StreamPool.Count); 482Assert.Equal(2, _connection.StreamPool.Count); 506Assert.Equal(0, _connection.StreamPool.Count); 513var stream = _connection._streams[1]; 521Assert.Equal(1, _connection.StreamPool.Count); 522Assert.True(_connection.StreamPool.TryPeek(out var pooledStream)); 538Assert.Equal(0, _connection.StreamPool.Count); 546Assert.Equal(1, _connection.StreamPool.Count); 547Assert.True(_connection.StreamPool.TryPeek(out pooledStream)); 578var stream = _connection._streams[1]; 591Assert.Equal(0, _connection.StreamPool.Count); 611_connection.ServerSettings.MaxConcurrentStreams = 1; 623Assert.Equal(0, _connection.StreamPool.Count); 636_connection.ServerSettings.MaxConcurrentStreams = 1; 653Assert.Equal(0, _connection.StreamPool.Count); 667Assert.Equal(0, _connection.StreamPool.Count); 680Assert.Equal(1, _connection.StreamPool.Count); 682_connection.StreamPool.TryPeek(out var pooledStream); 687Assert.Equal(1, _connection.StreamPool.Count); 692Assert.Equal(0, _connection.StreamPool.Count); 1663Assert.Equal((uint)100, _connection.MaxTrackedStreams); 1676Assert.Equal((uint)200, _connection.MaxTrackedStreams); 1689Assert.Equal((uint)int.MaxValue * 2, _connection.MaxTrackedStreams); 1701Assert.Equal(100u, _connection.MaxTrackedStreams); 1702_connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 1727_connection.SendEnhanceYourCalmOnStartStream = true; 2028_connection.HandleReadDataRateTimeout(); 2487_connection.ServerSettings.MaxConcurrentStreams = 1; 3616_connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)); 3668_connection.ServerSettings.HeaderTableSize = 0; 3669_connection.ServerSettings.MaxConcurrentStreams = 1; 3670_connection.ServerSettings.MaxHeaderListSize = 4 * 1024; 3671_connection.ServerSettings.InitialWindowSize = 1024 * 1024 * 10; 3673_connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)); 3876_connection.ServerSettings.MaxFrameSize = Http2PeerSettings.MaxAllowedMaxFrameSize; 3937_connection.ServerSettings.MaxFrameSize = Http2PeerSettings.MinAllowedMaxFrameSize + 1024; 4147var lifetime = _connection.ConnectionFeatures.Get<IConnectionLifetimeNotificationFeature>(); 5110_connection.OnInputOrOutputCompleted(); 5125_connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 5200_connection.StopProcessingNextRequest(ConnectionEndReason.AppShutdownTimeout); 5233_connection.StopProcessingNextRequest(ConnectionEndReason.AppShutdownTimeout); 5284_connection.OnInputOrOutputCompleted(); 5304await _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)).DefaultTimeout(); 5324await _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)).DefaultTimeout(); 5491_connection.ServerSettings.MaxConcurrentStreams = 0; // Refuse all streams 5493var connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)); 5573_connection.ServerSettings.MaxConcurrentStreams = 1; 5575var connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_ => requestBlock.Task)); 5646_connection.ServerSettings.MaxConcurrentStreams = 1; 5857await SendAsync(Encoding.ASCII.GetBytes($"GET /{new string('a', _connection.Limits.MaxRequestLineSize)} HTTP/1.1\r\n")); 5874_connection.ConnectionFeatures.Set<ITlsHandshakeFeature>(tlsHandshakeMock.Object);
Http2\Http2KeepAliveTests.cs (5)
18Assert.Null(_connection._keepAlive); 48Assert.Equal(KeepAliveState.PingSent, _connection._keepAlive._state); 202Assert.Equal(KeepAliveState.Timeout, _connection._keepAlive._state); 223Assert.Equal(KeepAliveState.PingSent, _connection._keepAlive._state); 230Assert.Equal(KeepAliveState.None, _connection._keepAlive._state);
Http2\Http2TestBase.cs (7)
495_connection._streamLifetimeHandler = new LifetimeHandlerInterceptor(_connection._streamLifetimeHandler, this); 498httpConnection.Initialize(_connection); 546if (_connection == null) 555var connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(application)); 608_ => throw new NotImplementedException($"{nameof(_connection.ProcessRequestsAsync)} should invoked instead - hence transport connection manager does not have the connection registered."), 1389((IRequestProcessor)_connection)?.Tick(timestamp);
Http2\Http2TimeoutTests.cs (1)
23_connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication));
Http2\Http2WebSocketTests.cs (8)
182var originalHandler = _connection._streamLifetimeHandler; 193_connection._streamLifetimeHandler = streamLifetimeHandler.Object; 249Assert.Equal(1, _connection.StreamPool.Count); 250Assert.True(_connection.StreamPool.TryPeek(out var pooledStream)); 621var originalHandler = _connection._streamLifetimeHandler; 635_connection._streamLifetimeHandler = streamLifetimeHandler.Object; 686Assert.Equal(1, _connection.StreamPool.Count); 687Assert.True(_connection.StreamPool.TryPeek(out var pooledStream));