@@ -24,8 +24,9 @@ public class FleckWebSocketTransport : WebSocketTransport<IWebSocketConnection>
2424 /// </summary>
2525 /// <param name="location">The given server address.</param>
2626 /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param>
27- public FleckWebSocketTransport ( string location , X509Certificate2 certificate = null )
28- : this ( location : location , cookieAuthenticatorFactory : null , certificate : certificate , getEnabledSslProtocols : null )
27+ /// <param name="supportDualStack">IPv4/IPv6 dual stack support</param>
28+ public FleckWebSocketTransport ( string location , X509Certificate2 certificate = null , bool supportDualStack = true )
29+ : this ( location : location , supportDualStack : supportDualStack , cookieAuthenticatorFactory : null , certificate : certificate , getEnabledSslProtocols : null )
2930 {
3031 }
3132
@@ -34,10 +35,11 @@ public FleckWebSocketTransport(string location, X509Certificate2 certificate = n
3435 /// given the server address to run at.
3536 /// </summary>
3637 /// <param name="location">The given server address.</param>
38+ /// <param name="supportDualStack">IPv4/IPv6 dual stack support</param>
3739 /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param>
3840 /// <param name="getEnabledSslProtocols"> If non-null, used to set Fleck's EnabledSslProtocols. </param>
39- public FleckWebSocketTransport ( string location , X509Certificate2 certificate , Func < SslProtocols > getEnabledSslProtocols )
40- : this ( location : location , cookieAuthenticatorFactory : null , certificate : certificate , getEnabledSslProtocols : getEnabledSslProtocols )
41+ public FleckWebSocketTransport ( string location , X509Certificate2 certificate , Func < SslProtocols > getEnabledSslProtocols , bool supportDualStack = true )
42+ : this ( location : location , supportDualStack : supportDualStack , cookieAuthenticatorFactory : null , certificate : certificate , getEnabledSslProtocols : getEnabledSslProtocols )
4143 {
4244 }
4345
@@ -48,10 +50,12 @@ public FleckWebSocketTransport(string location, X509Certificate2 certificate, Fu
4850 /// <param name="location">The given server address.</param>
4951 /// <param name="cookieAuthenticatorFactory"></param>
5052 /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param>
53+ /// <param name="supportDualStack">IPv4/IPv6 dual stack support</param>
5154 protected FleckWebSocketTransport ( string location ,
5255 ICookieAuthenticatorFactory cookieAuthenticatorFactory = null ,
53- X509Certificate2 certificate = null )
54- : this ( location : location , cookieAuthenticatorFactory : null , certificate : certificate , getEnabledSslProtocols : null )
56+ X509Certificate2 certificate = null ,
57+ bool supportDualStack = true )
58+ : this ( location : location , cookieAuthenticatorFactory : null , certificate : certificate , supportDualStack : supportDualStack , getEnabledSslProtocols : null )
5559 {
5660 }
5761
@@ -62,14 +66,16 @@ protected FleckWebSocketTransport(string location,
6266 /// <param name="location">The given server address.</param>
6367 /// <param name="cookieAuthenticatorFactory"></param>
6468 /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param>
69+ /// <param name="supportDualStack">IPv4/IPv6 dual stack support</param>
6570 /// <param name="getEnabledSslProtocols"> If non-null, used to set Fleck's EnabledSslProtocols. </param>
6671 protected FleckWebSocketTransport ( string location ,
6772 ICookieAuthenticatorFactory cookieAuthenticatorFactory = null ,
6873 X509Certificate2 certificate = null ,
69- Func < SslProtocols > getEnabledSslProtocols = null )
74+ Func < SslProtocols > getEnabledSslProtocols = null ,
75+ bool supportDualStack = true )
7076 : base ( cookieAuthenticatorFactory )
7177 {
72- mServer = new WebSocketServer ( location ) ;
78+ mServer = new WebSocketServer ( location , supportDualStack ) ;
7379 mServer . Certificate = certificate ;
7480
7581 if ( getEnabledSslProtocols != null )
0 commit comments