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); 416Assert.Equal(0, _connection.StreamPool.Count); 422var stream = _connection._streams[1]; 429Assert.Equal(1, _connection.StreamPool.Count); 445Assert.Equal(0, _connection.StreamPool.Count); 486Assert.Equal(2, _connection.StreamPool.Count); 513Assert.Equal(0, _connection.StreamPool.Count); 523var stream = _connection._streams[1]; 531Assert.Equal(1, _connection.StreamPool.Count); 532Assert.True(_connection.StreamPool.TryPeek(out var pooledStream)); 550Assert.Equal(0, _connection.StreamPool.Count); 558Assert.Equal(1, _connection.StreamPool.Count); 559Assert.True(_connection.StreamPool.TryPeek(out pooledStream)); 594var stream = _connection._streams[1]; 607Assert.Equal(0, _connection.StreamPool.Count); 627_connection.ServerSettings.MaxConcurrentStreams = 1; 639Assert.Equal(0, _connection.StreamPool.Count); 652_connection.ServerSettings.MaxConcurrentStreams = 1; 669Assert.Equal(0, _connection.StreamPool.Count); 683Assert.Equal(0, _connection.StreamPool.Count); 696Assert.Equal(1, _connection.StreamPool.Count); 698_connection.StreamPool.TryPeek(out var pooledStream); 703Assert.Equal(1, _connection.StreamPool.Count); 708Assert.Equal(0, _connection.StreamPool.Count); 1679Assert.Equal((uint)100, _connection.MaxTrackedStreams); 1692Assert.Equal((uint)200, _connection.MaxTrackedStreams); 1705Assert.Equal((uint)int.MaxValue * 2, _connection.MaxTrackedStreams); 1717Assert.Equal(100u, _connection.MaxTrackedStreams); 1718_connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 1743_connection.SendEnhanceYourCalmOnStartStream = true; 2044_connection.HandleReadDataRateTimeout(); 2503_connection.ServerSettings.MaxConcurrentStreams = 1; 3632_connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)); 3684_connection.ServerSettings.HeaderTableSize = 0; 3685_connection.ServerSettings.MaxConcurrentStreams = 1; 3686_connection.ServerSettings.MaxHeaderListSize = 4 * 1024; 3687_connection.ServerSettings.InitialWindowSize = 1024 * 1024 * 10; 3689_connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)); 3892_connection.ServerSettings.MaxFrameSize = Http2PeerSettings.MaxAllowedMaxFrameSize; 3953_connection.ServerSettings.MaxFrameSize = Http2PeerSettings.MinAllowedMaxFrameSize + 1024; 4163var lifetime = _connection.ConnectionFeatures.Get<IConnectionLifetimeNotificationFeature>(); 5126_connection.OnInputOrOutputCompleted(); 5141_connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 5216_connection.StopProcessingNextRequest(ConnectionEndReason.AppShutdownTimeout); 5249_connection.StopProcessingNextRequest(ConnectionEndReason.AppShutdownTimeout); 5300_connection.OnInputOrOutputCompleted(); 5320await _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)).DefaultTimeout(); 5340await _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)).DefaultTimeout(); 5507_connection.ServerSettings.MaxConcurrentStreams = 0; // Refuse all streams 5509var connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_noopApplication)); 5589_connection.ServerSettings.MaxConcurrentStreams = 1; 5591var connectionTask = _connection.ProcessRequestsAsync(new DummyApplication(_ => requestBlock.Task)); 5662_connection.ServerSettings.MaxConcurrentStreams = 1; 5873await SendAsync(Encoding.ASCII.GetBytes($"GET /{new string('a', _connection.Limits.MaxRequestLineSize)} HTTP/1.1\r\n")); 5890_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));