add missing constructor overloads (#44380)
authorGeoff Kizer <geoffrek@microsoft.com>
Sun, 8 Nov 2020 15:12:08 +0000 (07:12 -0800)
committerGitHub <noreply@github.com>
Sun, 8 Nov 2020 15:12:08 +0000 (10:12 -0500)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
src/libraries/System.Net.Quic/ref/System.Net.Quic.cs
src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs
src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs
src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs

index 4b46168..12f167a 100644 (file)
@@ -15,6 +15,7 @@ namespace System.Net.Quic
     public sealed class QuicListener : IDisposable
     {
         public QuicListener(IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw null; }
+        public QuicListener(QuicListenerOptions options) { throw null; }
         public QuicListener(Implementations.QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw null; }
         public QuicListener(Implementations.QuicImplementationProvider implementationProvider, QuicListenerOptions options) { throw null; }
         public IPEndPoint ListenEndPoint => throw null;
@@ -37,6 +38,7 @@ namespace System.Net.Quic
     public sealed class QuicConnection : IDisposable
     {
         public QuicConnection(System.Net.EndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions? sslClientAuthenticationOptions, System.Net.IPEndPoint? localEndPoint = null) { throw null; }
+        public QuicConnection(QuicClientConnectionOptions options) { throw null; }
         public QuicConnection(Implementations.QuicImplementationProvider implementationProvider, System.Net.EndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions? sslClientAuthenticationOptions, System.Net.IPEndPoint? localEndPoint = null) { throw null; }
         public QuicConnection(Implementations.QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options) { throw null; }
         public bool Connected => throw null;
index 352357d..47162f9 100644 (file)
@@ -43,7 +43,7 @@ namespace System.Net.Quic
         public long MaxUnidirectionalStreams { get; set; } = 100;
 
         /// <summary>
-        /// Idle timeout for connections, afterwhich the connection will be closed.
+        /// Idle timeout for connections, after which the connection will be closed.
         /// </summary>
         public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromMinutes(2);
     }
index 6e379fa..445b489 100644 (file)
@@ -25,12 +25,22 @@ namespace System.Net.Quic
         {
         }
 
-        // !!! TEMPORARY: Remove "implementationProvider" before shipping
+        /// <summary>
+        /// Create an outbound QUIC connection.
+        /// </summary>
+        /// <param name="options">The connection options.</param>
+        public QuicConnection(QuicClientConnectionOptions options)
+            : this(QuicImplementationProviders.Default, options)
+        {
+        }
+
+        // !!! TEMPORARY: Remove or make internal before shipping
         public QuicConnection(QuicImplementationProvider implementationProvider, EndPoint remoteEndPoint, SslClientAuthenticationOptions? sslClientAuthenticationOptions, IPEndPoint? localEndPoint = null)
             : this(implementationProvider, new QuicClientConnectionOptions() { RemoteEndPoint = remoteEndPoint, ClientAuthenticationOptions = sslClientAuthenticationOptions, LocalEndPoint = localEndPoint })
         {
         }
 
+        // !!! TEMPORARY: Remove or make internal before shipping
         public QuicConnection(QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options)
         {
             _provider = implementationProvider.CreateConnection(options);
index c0db8cd..e465bc2 100644 (file)
@@ -13,7 +13,7 @@ namespace System.Net.Quic
         private readonly QuicListenerProvider _provider;
 
         /// <summary>
-        /// Create a QUIC listener on the specified local endpoint and start listening.
+        /// Create a QUIC listener.
         /// </summary>
         /// <param name="listenEndPoint">The local endpoint to listen on.</param>
         /// <param name="sslServerAuthenticationOptions">TLS options for the listener.</param>
@@ -22,12 +22,22 @@ namespace System.Net.Quic
         {
         }
 
-        // !!! TEMPORARY: Remove "implementationProvider" before shipping
+        /// <summary>
+        /// Create a QUIC listener.
+        /// </summary>
+        /// <param name="options">The listener options.</param>
+        public QuicListener(QuicListenerOptions options)
+            : this(QuicImplementationProviders.Default, options)
+        {
+        }
+
+        // !!! TEMPORARY: Remove or make internal before shipping
         public QuicListener(QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, SslServerAuthenticationOptions sslServerAuthenticationOptions)
             : this(implementationProvider,  new QuicListenerOptions() { ListenEndPoint = listenEndPoint, ServerAuthenticationOptions = sslServerAuthenticationOptions })
         {
         }
 
+        // !!! TEMPORARY: Remove or make internal before shipping
         public QuicListener(QuicImplementationProvider implementationProvider, QuicListenerOptions options)
         {
             _provider = implementationProvider.CreateListener(options);