2 instantiations of QuicConnection
System.Net.Quic (2)
System\Net\Quic\QuicConnection.cs (1)
74QuicConnection connection = new QuicConnection();
System\Net\Quic\QuicListener.cs (1)
337QuicConnection connection = new QuicConnection(data.Connection, data.Info);
142 references to QuicConnection
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (6)
Internal\QuicConnectionContext.cs (3)
26private readonly QuicConnection _connection; 38public QuicConnectionContext(QuicConnection connection, QuicTransportContext context) 282internal QuicConnection GetInnerConnection()
Internal\QuicConnectionListener.cs (3)
28internal readonly ConditionalWeakTable<QuicConnection, QuicConnectionContext> _pendingConnections; 53_pendingConnections = new ConditionalWeakTable<QuicConnection, QuicConnectionContext>(); 157var quicConnection = await _listener.AcceptConnectionAsync(cancellationToken);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (82)
QuicConnectionContextTests.cs (33)
37await using var clientConnection = await QuicConnection.ConnectAsync(options); 61await using var clientConnection = await QuicConnection.ConnectAsync(options); 87await using var clientConnection = await QuicConnection.ConnectAsync(options); 128await using var clientConnection = await QuicConnection.ConnectAsync(options); 154await using var quicConnection = await QuicConnection.ConnectAsync(options); 196await using var quicConnection = await QuicConnection.ConnectAsync(options); 246await using var quicConnection = await QuicConnection.ConnectAsync(options); 291await using var quicConnection = await QuicConnection.ConnectAsync(options); 317await using var clientConnection = await QuicConnection.ConnectAsync(options); 360await using var clientConnection = await QuicConnection.ConnectAsync(options); 405await using var clientConnection = await QuicConnection.ConnectAsync(options); 454await using var clientConnection = await QuicConnection.ConnectAsync(options); 512await using var clientConnection = await QuicConnection.ConnectAsync(options); 566await using var clientConnection = await QuicConnection.ConnectAsync(options); 671await using var clientConnection = await QuicConnection.ConnectAsync(options); 750await using var clientConnection = await QuicConnection.ConnectAsync(options); 768QuicConnection QuicConnection,
QuicConnectionListenerTests.cs (20)
53await using var clientConnection = await QuicConnection.ConnectAsync(options); 74await using var clientConnection1 = await QuicConnection.ConnectAsync( 88await QuicConnection.ConnectAsync( 99await using var clientConnection2 = await QuicConnection.ConnectAsync( 122await using var quicConnection = await QuicConnection.ConnectAsync(options); 158await using var clientConnection = await QuicConnection.ConnectAsync(options); 184await Assert.ThrowsAsync<AuthenticationException>(() => QuicConnection.ConnectAsync(options).AsTask()); 257var ex = await Assert.ThrowsAsync<AuthenticationException>(() => QuicConnection.ConnectAsync(options).AsTask()).DefaultTimeout(); 263await using var clientConnection = await QuicConnection.ConnectAsync(options).DefaultTimeout(); 321await using var clientConnection = await QuicConnection.ConnectAsync(options).DefaultTimeout(); 356var clientConnectionTask = QuicConnection.ConnectAsync(options); 364await using var clientConnection = await clientConnectionTask.DefaultTimeout(); 397var clientConnectionTask = QuicConnection.ConnectAsync(options); 452await using var clientConnection = await QuicConnection.ConnectAsync(options).DefaultTimeout();
QuicStreamContextTests.cs (28)
38await using var clientConnection = await QuicConnection.ConnectAsync(options); 62await using var clientConnection = await QuicConnection.ConnectAsync(options); 110await using var clientConnection = await QuicConnection.ConnectAsync(options); 178await using var clientConnection = await QuicConnection.ConnectAsync(options); 235await using var clientConnection = await QuicConnection.ConnectAsync(options); 257await using var quicConnection = await QuicConnection.ConnectAsync(options); 301await using var quicConnection = await QuicConnection.ConnectAsync(options); 335await using var quicConnection = await QuicConnection.ConnectAsync(options); 374await using var quicConnection = await QuicConnection.ConnectAsync(options); 405await using var quicConnection = await QuicConnection.ConnectAsync(options); 446await using var quicConnection = await QuicConnection.ConnectAsync(options); 490await using var quicConnection = await QuicConnection.ConnectAsync(options); 540await using var clientConnection = await QuicConnection.ConnectAsync(options); 567await using var clientConnection = await QuicConnection.ConnectAsync(options);
QuicTestHelpers.cs (1)
143public static async Task<QuicStreamContext> CreateAndCompleteBidirectionalStreamGracefully(QuicConnection clientConnection, MultiplexedConnectionContext serverConnection, ILogger logger)
System.Net.Http (12)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (3)
115public static async ValueTask<QuicConnection> ConnectQuicAsync(HttpRequestMessage request, DnsEndPoint endPoint, TimeSpan idleTimeout, SslClientAuthenticationOptions clientAuthenticationOptions, Action<QuicConnection, QuicStreamCapacityChangedArgs> streamCapacityCallback, CancellationToken cancellationToken) 121return await QuicConnection.ConnectAsync(new QuicClientConnectionOptions()
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
424if (QuicConnection.IsSupported)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
273QuicConnection quicConnection = await ConnectHelper.ConnectQuicAsync(queueItem.Request, new DnsEndPoint(authority.IdnHost, authority.Port), _poolManager.Settings._pooledConnectionIdleTimeout, _sslOptionsHttp3!, connection.StreamCapacityCallback, cts.Token).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (7)
24private QuicConnection? _connection; 92public void InitQuicConnection(QuicConnection connection, Activity? connectionSetupActivity) 143QuicConnection connection = _connection; 150Trace($"{nameof(QuicConnection)} failed to close: {closeTask.Exception!.InnerException}"); 159Trace($"{nameof(QuicConnection)} failed to dispose: {ex}"); 207public void StreamCapacityCallback(QuicConnection connection, QuicStreamCapacityChangedArgs args) 254QuicConnection? conn = _connection;
System.Net.Quic (42)
System\Net\Quic\QuicConnection.cs (14)
32/// <see cref="QuicConnection" /> itself doesn't send or receive data but rather allows opening and/or accepting multiple <see cref="QuicStream" />. 35/// <see cref="QuicConnection" /> can either be accepted from <see cref="QuicListener.AcceptConnectionAsync(CancellationToken)" /> (inbound connection), 36/// or create with a static method <see cref="QuicConnection.ConnectAsync(System.Net.Quic.QuicClientConnectionOptions, CancellationToken)" /> (outbound connection). 38/// Each connection can then open outbound stream: <see cref="QuicConnection.OpenOutboundStreamAsync(QuicStreamType, CancellationToken)" />, 39/// or accept an inbound stream: <see cref="QuicConnection.AcceptInboundStreamAsync(CancellationToken)" />. 56/// Creates a new <see cref="QuicConnection"/> and connects it to the peer. 61public static ValueTask<QuicConnection> ConnectAsync(QuicClientConnectionOptions options, CancellationToken cancellationToken = default) 72static async ValueTask<QuicConnection> StartConnectAsync(QuicClientConnectionOptions options, CancellationToken cancellationToken) 74QuicConnection connection = new QuicConnection(); 124if (target is QuicConnection connection) 190private Action<QuicConnection, QuicStreamCapacityChangedArgs>? _streamCapacityCallback; 314/// Initializes a new instance of an outbound <see cref="QuicConnection" />. 346/// Initializes a new instance of an inbound <see cref="QuicConnection" />. 780if (!stateHandle.IsAllocated || stateHandle.Target is not QuicConnection instance)
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (2)
26private readonly QuicConnection _connection; 55public SslConnectionOptions(QuicConnection connection, bool isClient,
System\Net\Quic\QuicConnectionOptions.cs (9)
12/// Collection of receive window sizes for <see cref="QuicConnection"/> as a whole and for individual <see cref="QuicStream"/> types. 69/// Shared options for both client (outbound) and server (inbound) <see cref="QuicConnection" />. 106/// Error code used for <see cref="QuicConnection.CloseAsync(long, Threading.CancellationToken)"/> when the connection gets disposed. 110/// To use different close error code, call <see cref="QuicConnection.CloseAsync(long, Threading.CancellationToken)"/> explicitly before disposing. 145/// The initial capacity is reported with the first invocation of the callback that might happen before the <see cref="QuicConnection"/> instance is handed out via either 146/// <see cref="QuicConnection.ConnectAsync(QuicClientConnectionOptions, CancellationToken)"/> or <see cref="QuicListener.AcceptConnectionAsync(CancellationToken)"/>. 148public Action<QuicConnection, QuicStreamCapacityChangedArgs>? StreamCapacityCallback { get; set; } 169/// Options for client (outbound) <see cref="QuicConnection" />. 214/// Options for server (inbound) <see cref="QuicConnection" />. Provided by <see cref="QuicListenerOptions.ConnectionOptionsCallback"/>.
System\Net\Quic\QuicError.cs (1)
7/// Defines the various error conditions for <see cref="QuicListener"/>, <see cref="QuicConnection"/> and <see cref="QuicStream"/> operations.
System\Net\Quic\QuicListener.cs (11)
25/// <see cref="QuicListener" /> allows accepting multiple <see cref="QuicConnection" />. 94private readonly Func<QuicConnection, SslClientHelloInfo, CancellationToken, ValueTask<QuicServerConnectionOptions>> _connectionOptionsCallback; 97/// Incoming connections waiting to be accepted via AcceptAsync. The item will either be fully connected <see cref="QuicConnection"/> or <see cref="Exception"/> if the handshake failed. 168/// Accepts an inbound <see cref="QuicConnection" />. 175/// <returns>A task that will contain a fully connected <see cref="QuicConnection" /> which successfully finished the handshake and is ready to be used.</returns> 176public async ValueTask<QuicConnection> AcceptConnectionAsync(CancellationToken cancellationToken = default) 186if (item is QuicConnection connection) 209/// It does await <see cref="QuicConnection.FinishHandshakeAsync"/> but that never gets propagated to the caller for which the method ends with the first asynchronously processed <c>await</c>. 214private async void StartConnectionHandshake(QuicConnection connection, SslClientHelloInfo clientHello) 337QuicConnection connection = new QuicConnection(data.Connection, data.Info); 436if (item is QuicConnection connection)
System\Net\Quic\QuicListenerOptions.cs (1)
37public Func<QuicConnection, SslClientHelloInfo, CancellationToken, ValueTask<QuicServerConnectionOptions>> ConnectionOptionsCallback { get; set; } = null!;
System\Net\Quic\QuicStream.cs (4)
125/// Provided via <see cref="StartAsync(Action{QuicStreamType}, CancellationToken)" /> from <see cref="QuicConnection" /> so that <see cref="QuicStream"/> can decrement its available stream count field. 126/// When <see cref="HandleEventStartComplete(ref START_COMPLETE_DATA)">START_COMPLETE</see> arrives it gets invoked and unset back to <c>null</c> to not to hold any unintended reference to <see cref="QuicConnection"/>. 163/// <param name="connectionHandle"><see cref="QuicConnection"/> safe handle, used to increment/decrement reference count with each associated stream.</param> 204/// <param name="connectionHandle"><see cref="QuicConnection"/> safe handle, used to increment/decrement reference count with each associated stream.</param>