Skip to content

Commit 3d021c9

Browse files
authored
Merge pull request #291 from Code-Sharp/AddDualStackSupport
Add dual support
2 parents e8a6ef1 + 220586a commit 3d021c9

File tree

7 files changed

+28
-20
lines changed

7 files changed

+28
-20
lines changed

NuGet/WampSharp.Fleck.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
<dependencies>
88
<group targetFramework="net46">
99
<dependency id="WampSharp" version="[$version$]" />
10-
<dependency id="Fleck" version="[1.0.3, )" />
10+
<dependency id="Fleck" version="[1.1.0, )" />
1111
</group>
1212
<group targetFramework="net45">
1313
<dependency id="WampSharp" version="[$version$]" />
14-
<dependency id="Fleck" version="[1.0.3, )" />
14+
<dependency id="Fleck" version="[1.1.0, )" />
1515
</group>
1616
<group targetFramework="net40">
1717
<dependency id="WampSharp" version="[$version$]" />
18-
<dependency id="Fleck" version="[0.14.0.59]" />
18+
<dependency id="Fleck" version="[1.1.0]" />
1919
</group>
2020
<group targetFramework=".NETStandard2.0">
2121
<dependency id="WampSharp" version="[$version$]" />
22-
<dependency id="Fleck" version="[1.0.3, )" />
22+
<dependency id="Fleck" version="[1.1.0, )" />
2323
</group>
2424
</dependencies>
2525
<id>WampSharp.Fleck</id>

src/net40/Default/WampSharp.Fleck/WampSharp.Fleck.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<ProjectReference Include="..\..\WampSharp\WampSharp.csproj" />
3636
</ItemGroup>
3737
<ItemGroup>
38-
<PackageReference Include="Fleck" Version="0.14.0.59" />
38+
<PackageReference Include="Fleck" Version="1.1.0" />
3939
</ItemGroup>
4040
<ItemGroup>
4141
<Reference Include="System.Data.DataSetExtensions" />

src/net45/Default/WampSharp.Fleck/Fleck/FleckAuthenticatedWebSocketTransport.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ public class FleckAuthenticatedWebSocketTransport : FleckWebSocketTransport
1010
public FleckAuthenticatedWebSocketTransport
1111
(string location,
1212
ICookieAuthenticatorFactory cookieAuthenticatorFactory = null,
13-
X509Certificate2 certificate = null)
14-
: this(location: location, cookieAuthenticatorFactory: cookieAuthenticatorFactory, certificate: certificate, getEnabledSslProtocols: null)
13+
X509Certificate2 certificate = null,
14+
bool supportDualStack = true)
15+
: this(location: location, supportDualStack: supportDualStack, cookieAuthenticatorFactory: cookieAuthenticatorFactory, certificate: certificate, getEnabledSslProtocols: null)
1516
{
1617
}
1718

1819
public FleckAuthenticatedWebSocketTransport
1920
(string location,
2021
ICookieAuthenticatorFactory cookieAuthenticatorFactory = null,
2122
X509Certificate2 certificate = null,
22-
Func<SslProtocols> getEnabledSslProtocols = null)
23-
: base(location, cookieAuthenticatorFactory, certificate, getEnabledSslProtocols)
23+
Func<SslProtocols> getEnabledSslProtocols = null,
24+
bool supportDualStack = true)
25+
: base(location, cookieAuthenticatorFactory, certificate, getEnabledSslProtocols, supportDualStack)
2426
{
2527
}
2628
}

src/net45/Default/WampSharp.Fleck/Fleck/FleckWebSocketTransport.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

src/net45/Default/WampSharp.Fleck/WampSharp.Fleck.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<ProjectReference Include="..\..\WampSharp\WampSharp.csproj" />
4444
</ItemGroup>
4545
<ItemGroup>
46-
<PackageReference Include="Fleck" Version="1.0.3" />
46+
<PackageReference Include="Fleck" Version="1.1.0" />
4747
</ItemGroup>
4848
<ItemGroup>
4949
<Reference Include="System.Data.DataSetExtensions" />

src/net46/Default/WampSharp.Fleck/WampSharp.Fleck.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<ItemGroup>
1212
<ProjectReference Include="..\..\WampSharp\WampSharp.csproj" />
13-
<PackageReference Include="Fleck" Version="1.0.3" />
13+
<PackageReference Include="Fleck" Version="1.1.0" />
1414
</ItemGroup>
1515

1616
</Project>

src/netstandard2.0/Default/WampSharp.Fleck/WampSharp.Fleck.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<ItemGroup>
1616
<ProjectReference Include="..\..\WampSharp\WampSharp.csproj" />
17-
<PackageReference Include="Fleck" Version="1.0.3" />
17+
<PackageReference Include="Fleck" Version="1.1.0" />
1818
</ItemGroup>
1919

2020

0 commit comments

Comments
 (0)