Skip to content

Commit 77f1def

Browse files
geoffkizerGeoffrey Kizer
andauthored
add missing constructor overloads (#44380)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
1 parent 628c14b commit 77f1def

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

src/libraries/System.Net.Quic/ref/System.Net.Quic.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static class QuicImplementationProviders
1515
public sealed class QuicListener : IDisposable
1616
{
1717
public QuicListener(IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw null; }
18+
public QuicListener(QuicListenerOptions options) { throw null; }
1819
public QuicListener(Implementations.QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw null; }
1920
public QuicListener(Implementations.QuicImplementationProvider implementationProvider, QuicListenerOptions options) { throw null; }
2021
public IPEndPoint ListenEndPoint => throw null;
@@ -37,6 +38,7 @@ public class QuicListenerOptions
3738
public sealed class QuicConnection : IDisposable
3839
{
3940
public QuicConnection(System.Net.EndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions? sslClientAuthenticationOptions, System.Net.IPEndPoint? localEndPoint = null) { throw null; }
41+
public QuicConnection(QuicClientConnectionOptions options) { throw null; }
4042
public QuicConnection(Implementations.QuicImplementationProvider implementationProvider, System.Net.EndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions? sslClientAuthenticationOptions, System.Net.IPEndPoint? localEndPoint = null) { throw null; }
4143
public QuicConnection(Implementations.QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options) { throw null; }
4244
public bool Connected => throw null;

src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class QuicClientConnectionOptions
4343
public long MaxUnidirectionalStreams { get; set; } = 100;
4444

4545
/// <summary>
46-
/// Idle timeout for connections, afterwhich the connection will be closed.
46+
/// Idle timeout for connections, after which the connection will be closed.
4747
/// </summary>
4848
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromMinutes(2);
4949
}

src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,22 @@ public QuicConnection(EndPoint remoteEndPoint, SslClientAuthenticationOptions? s
2525
{
2626
}
2727

28-
// !!! TEMPORARY: Remove "implementationProvider" before shipping
28+
/// <summary>
29+
/// Create an outbound QUIC connection.
30+
/// </summary>
31+
/// <param name="options">The connection options.</param>
32+
public QuicConnection(QuicClientConnectionOptions options)
33+
: this(QuicImplementationProviders.Default, options)
34+
{
35+
}
36+
37+
// !!! TEMPORARY: Remove or make internal before shipping
2938
public QuicConnection(QuicImplementationProvider implementationProvider, EndPoint remoteEndPoint, SslClientAuthenticationOptions? sslClientAuthenticationOptions, IPEndPoint? localEndPoint = null)
3039
: this(implementationProvider, new QuicClientConnectionOptions() { RemoteEndPoint = remoteEndPoint, ClientAuthenticationOptions = sslClientAuthenticationOptions, LocalEndPoint = localEndPoint })
3140
{
3241
}
3342

43+
// !!! TEMPORARY: Remove or make internal before shipping
3444
public QuicConnection(QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options)
3545
{
3646
_provider = implementationProvider.CreateConnection(options);

src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public sealed class QuicListener : IDisposable
1313
private readonly QuicListenerProvider _provider;
1414

1515
/// <summary>
16-
/// Create a QUIC listener on the specified local endpoint and start listening.
16+
/// Create a QUIC listener.
1717
/// </summary>
1818
/// <param name="listenEndPoint">The local endpoint to listen on.</param>
1919
/// <param name="sslServerAuthenticationOptions">TLS options for the listener.</param>
@@ -22,12 +22,22 @@ public QuicListener(IPEndPoint listenEndPoint, SslServerAuthenticationOptions ss
2222
{
2323
}
2424

25-
// !!! TEMPORARY: Remove "implementationProvider" before shipping
25+
/// <summary>
26+
/// Create a QUIC listener.
27+
/// </summary>
28+
/// <param name="options">The listener options.</param>
29+
public QuicListener(QuicListenerOptions options)
30+
: this(QuicImplementationProviders.Default, options)
31+
{
32+
}
33+
34+
// !!! TEMPORARY: Remove or make internal before shipping
2635
public QuicListener(QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, SslServerAuthenticationOptions sslServerAuthenticationOptions)
2736
: this(implementationProvider, new QuicListenerOptions() { ListenEndPoint = listenEndPoint, ServerAuthenticationOptions = sslServerAuthenticationOptions })
2837
{
2938
}
3039

40+
// !!! TEMPORARY: Remove or make internal before shipping
3141
public QuicListener(QuicImplementationProvider implementationProvider, QuicListenerOptions options)
3242
{
3343
_provider = implementationProvider.CreateListener(options);

0 commit comments

Comments
 (0)