Skip to content

Commit cb3cb0f

Browse files
committed
Rename WebSocket client
1 parent bda817d commit cb3cb0f

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

NFWebsockets.Example/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void Main()
3838
Debug.WriteLine($"WebSocket server is up and running, connect on: ws://{ip}:{webSocketServer.Port}{webSocketServer.Prefix}");
3939

4040
//Now let's also attach a local websocket client. Just because we can :-)
41-
WebSocketClient client = new WebSocketClient();
41+
ClientWebSocket client = new ClientWebSocket();
4242

4343
///////////////////////////////////////////
4444
// secure connection config

Websockets.Client/System.Net.WebSockets.Client.nfproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
</ItemGroup>
5252
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
5353
<ItemGroup>
54+
<Compile Include="..\WebSockets\ClientWebSocket\ClientWebSocket.cs">
55+
<Link>ClientWebSocket\ClientWebSocket.cs</Link>
56+
</Compile>
57+
<Compile Include="..\WebSockets\ClientWebSocket\ClientWebSocketOptions.cs">
58+
<Link>ClientWebSocket\ClientWebSocketOptions.cs</Link>
59+
</Compile>
5460
<Compile Include="..\WebSockets\MessageReceivedEventArgs.cs">
5561
<Link>MessageReceivedEventArgs.cs</Link>
5662
</Compile>
@@ -60,12 +66,6 @@
6066
<Compile Include="..\WebSockets\WebSocket.cs">
6167
<Link>WebSocket.cs</Link>
6268
</Compile>
63-
<Compile Include="..\WebSockets\WebSocketClient\ClientWebSocketOptions.cs">
64-
<Link>WebSocketClient\ClientWebSocketOptions.cs</Link>
65-
</Compile>
66-
<Compile Include="..\WebSockets\WebSocketClient\WebSocketClient.cs">
67-
<Link>WebSocketClient\WebSocketClient.cs</Link>
68-
</Compile>
6969
<Compile Include="..\WebSockets\WebSocketFrame\FragmentationType.cs">
7070
<Link>WebSocketFrame\FragmentationType.cs</Link>
7171
</Compile>
@@ -106,7 +106,7 @@
106106
</ItemGroup>
107107
<ItemGroup>
108108
<None Include="packages.config" />
109-
<None Include="..\WebSockets\key.snk"/>
109+
<None Include="..\WebSockets\key.snk" />
110110
</ItemGroup>
111111
<ItemGroup>
112112
<Reference Include="mscorlib, Version=1.10.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
@@ -137,7 +137,7 @@
137137
</ItemGroup>
138138
<ItemGroup>
139139
<Folder Include="WebSocketFrame\" />
140-
<Folder Include="WebSocketClient\" />
140+
<Folder Include="ClientWebSocket\" />
141141
</ItemGroup>
142142
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
143143
<ProjectExtensions>

Websockets.Server/System.Net.WebSockets.Server.nfproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
</ItemGroup>
113113
<ItemGroup>
114114
<None Include="packages.config" />
115-
<None Include="..\WebSockets\key.snk"/>
115+
<None Include="..\WebSockets\key.snk" />
116116
</ItemGroup>
117117
<ItemGroup>
118118
<Reference Include="mscorlib, Version=1.10.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">

Websockets/WebSocketClient/WebSocketClient.cs renamed to Websockets/ClientWebSocket/ClientWebSocket.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ namespace System.Net.WebSockets
1717
public delegate void MessageReceivedEventHandler(object sender, MessageReceivedEventArgs e);
1818

1919
/// <summary>
20-
/// Provides a client for connecting to WebSocket services..
20+
/// Provides a client for connecting to WebSocket services.
2121
/// </summary>
22-
public class WebSocketClient : WebSocket, IDisposable
22+
public class ClientWebSocket : WebSocket, IDisposable
2323
{
2424
private NetworkStream _networkStream;
2525

@@ -78,10 +78,10 @@ public X509Certificate CACertificate
7878
public bool UseStoredDeviceCertificate { get; set; } = false;
7979

8080
/// <summary>
81-
/// Gets the WebSocket state of the <see cref="WebSocketClient"/> instance.
81+
/// Gets the WebSocket state of the <see cref="ClientWebSocket"/> instance.
8282
/// </summary>
8383
/// <value>
84-
/// The WebSocket state of the <see cref="WebSocketClient"/> instance.
84+
/// The WebSocket state of the <see cref="ClientWebSocket"/> instance.
8585
/// </value>
8686
public override WebSocketState State { get; set; } = WebSocketState.Closed;
8787

@@ -91,7 +91,7 @@ public X509Certificate CACertificate
9191
/// Creates an instance of the WebSocketClient class.
9292
/// </summary>
9393
/// <param name="options">Optional <see cref="ClientWebSocketOptions"/> where extra options can be defined.</param>
94-
public WebSocketClient(ClientWebSocketOptions options = null) : base(options)
94+
public ClientWebSocket(ClientWebSocketOptions options = null) : base(options)
9595
{
9696
if(options != null)
9797
{

Websockets/System.Net.WebSockets.nfproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
<Compile Include="MessageReceivedEventArgs.cs" />
5555
<Compile Include="Properties\AssemblyInfo.cs" />
5656
<Compile Include="WebSocket.cs" />
57-
<Compile Include="WebSocketClient\ClientWebSocketOptions.cs" />
58-
<Compile Include="WebSocketClient\WebSocketClient.cs" />
57+
<Compile Include="ClientWebSocket\ClientWebSocketOptions.cs" />
58+
<Compile Include="ClientWebSocket\ClientWebSocket.cs" />
5959
<Compile Include="WebSocketFrame\FragmentationType.cs" />
6060
<Compile Include="WebSocketFrame\MessageFrame.cs" />
6161
<Compile Include="WebSocketFrame\OpCode.cs" />

0 commit comments

Comments
 (0)