2 instantiations of QuicConnection
System.Net.Quic (2)
System\Net\Quic\QuicConnection.cs (1)
74
QuicConnection connection = new
QuicConnection
();
System\Net\Quic\QuicListener.cs (1)
337
QuicConnection connection = new
QuicConnection
(data.Connection, data.Info);
142 references to QuicConnection
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (6)
Internal\QuicConnectionContext.cs (3)
26
private readonly
QuicConnection
_connection;
38
public QuicConnectionContext(
QuicConnection
connection, QuicTransportContext context)
282
internal
QuicConnection
GetInnerConnection()
Internal\QuicConnectionListener.cs (3)
28
internal readonly ConditionalWeakTable<
QuicConnection
, QuicConnectionContext> _pendingConnections;
53
_pendingConnections = new ConditionalWeakTable<
QuicConnection
, QuicConnectionContext>();
157
var
quicConnection = await _listener.AcceptConnectionAsync(cancellationToken);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (82)
QuicConnectionContextTests.cs (33)
37
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
61
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
87
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
128
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
154
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
196
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
246
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
291
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
317
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
360
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
405
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
454
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
512
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
566
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
671
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
750
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
768
QuicConnection
QuicConnection,
QuicConnectionListenerTests.cs (20)
53
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
74
await using var clientConnection1 = await
QuicConnection
.ConnectAsync(
88
await
QuicConnection
.ConnectAsync(
99
await using var clientConnection2 = await
QuicConnection
.ConnectAsync(
122
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
158
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
184
await Assert.ThrowsAsync<AuthenticationException>(() =>
QuicConnection
.ConnectAsync(options).AsTask());
257
var ex = await Assert.ThrowsAsync<AuthenticationException>(() =>
QuicConnection
.ConnectAsync(options).AsTask()).DefaultTimeout();
263
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options).DefaultTimeout();
321
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options).DefaultTimeout();
356
var clientConnectionTask =
QuicConnection
.ConnectAsync(options);
364
await using
var
clientConnection = await clientConnectionTask.DefaultTimeout();
397
var clientConnectionTask =
QuicConnection
.ConnectAsync(options);
452
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options).DefaultTimeout();
QuicStreamContextTests.cs (28)
38
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
62
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
110
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
178
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
235
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
257
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
301
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
335
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
374
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
405
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
446
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
490
await using
var
quicConnection = await
QuicConnection
.ConnectAsync(options);
540
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
567
await using
var
clientConnection = await
QuicConnection
.ConnectAsync(options);
QuicTestHelpers.cs (1)
143
public static async Task<QuicStreamContext> CreateAndCompleteBidirectionalStreamGracefully(
QuicConnection
clientConnection, MultiplexedConnectionContext serverConnection, ILogger logger)
System.Net.Http (12)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (3)
115
public static async ValueTask<
QuicConnection
> ConnectQuicAsync(HttpRequestMessage request, DnsEndPoint endPoint, TimeSpan idleTimeout, SslClientAuthenticationOptions clientAuthenticationOptions, Action<
QuicConnection
, QuicStreamCapacityChangedArgs> streamCapacityCallback, CancellationToken cancellationToken)
121
return await
QuicConnection
.ConnectAsync(new QuicClientConnectionOptions()
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
424
if (
QuicConnection
.IsSupported)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
273
QuicConnection
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)
24
private
QuicConnection
? _connection;
92
public void InitQuicConnection(
QuicConnection
connection, Activity? connectionSetupActivity)
143
QuicConnection
connection = _connection;
150
Trace($"{nameof(
QuicConnection
)} failed to close: {closeTask.Exception!.InnerException}");
159
Trace($"{nameof(
QuicConnection
)} failed to dispose: {ex}");
207
public void StreamCapacityCallback(
QuicConnection
connection, QuicStreamCapacityChangedArgs args)
254
QuicConnection
? 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.
61
public static ValueTask<
QuicConnection
> ConnectAsync(QuicClientConnectionOptions options, CancellationToken cancellationToken = default)
72
static async ValueTask<
QuicConnection
> StartConnectAsync(QuicClientConnectionOptions options, CancellationToken cancellationToken)
74
QuicConnection
connection = new QuicConnection();
124
if (target is
QuicConnection
connection)
190
private 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
" />.
780
if (!stateHandle.IsAllocated || stateHandle.Target is not
QuicConnection
instance)
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (2)
26
private readonly
QuicConnection
_connection;
55
public 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)"/>.
148
public 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
" />.
94
private 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>
176
public async ValueTask<
QuicConnection
> AcceptConnectionAsync(CancellationToken cancellationToken = default)
186
if (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>.
214
private async void StartConnectionHandshake(
QuicConnection
connection, SslClientHelloInfo clientHello)
337
QuicConnection
connection = new QuicConnection(data.Connection, data.Info);
436
if (item is
QuicConnection
connection)
System\Net\Quic\QuicListenerOptions.cs (1)
37
public 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>