Skip to content

Commit 9c4993f

Browse files
authored
Specific readme for websocket client and server sample (#199)
***NO_CI***
1 parent 2b4bcbb commit 9c4993f

File tree

3 files changed

+86
-2
lines changed

3 files changed

+86
-2
lines changed

samples/WebSockets/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Shows how to use the WebSockets related APIs in [System.Net.WebSockets](http://d
1111

1212
### WebSockets Client Sample
1313

14-
[ServerClient.Sample](./Websockets.ServerClient.Sample) shows how to use the Websocket Client.
14+
[Client.Sample](./Websockets.Client.Sample) shows how to use the Websocket Client.
1515

1616
### WebSockets Server and Client sample
1717

@@ -20,7 +20,7 @@ Shows how to use the WebSockets related APIs in [System.Net.WebSockets](http://d
2020
## Hardware requirements
2121

2222
An hardware device with networking capabilities running a nanoFramework image.
23-
The Websocket Server Sample requires a M5Stack Atom Light board, but can be easily changed to another board connected to a rgb led.
23+
The Websocket Server Sample requires a M5Stack ATOM Lite board, but can be easily changed to another board connected to a rgb led.
2424

2525
## Related topics
2626

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# WebSocket Client Sample
2+
3+
Shows how to use the WebSockets related APIs in [System.Net.WebSockets](http://docs.nanoframework.net/api/System.Net.WebSockets.html). Documentation on the Websocket library can be found in the [WebSockets Repo](https://github.com/nanoframework/System.Net.WebSockets).
4+
5+
## Sample
6+
7+
This sample shows howto use Websocket Client.
8+
9+
## Hardware requirements
10+
11+
An hardware device with networking capabilities running a nanoFramework image.
12+
13+
## Related topics
14+
15+
### Reference
16+
17+
- [nanoFramework.Net.WebSockets](https://github.com/nanoframework/System.Net.WebSockets/blob/develop/README.md)
18+
- [System.Net.WebSockets](http://docs.nanoframework.net/api/System.Net.WebSockets.html)
19+
- [getting started guide](https://www.feiko.io/posts/2022-01-03-getting-started-with-net-nanoframework)
20+
21+
## Building the samples
22+
23+
1. Start Microsoft Visual Studio 2022 (VS 2019 and VS 2017 should be OK too) and select `File > Open > Project/Solution`.
24+
2. Starting in the folder where you unzipped the samples/cloned the repository, go to the subfolder for this specific sample. Double-click the Visual Studio Solution (.sln) file.
25+
3. Change the WiFi Ssid and Password on line 14 and 15, also change the url for the websocket server on line 41.
26+
4. Press `Ctrl+Shift+B`, or select `Build > Build Solution`.
27+
28+
## Run the sample
29+
30+
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
31+
32+
### Deploying the sample
33+
34+
- Select `Build > Deploy Solution`.
35+
36+
### Deploying and running the sample
37+
38+
- To debug the sample and then run it, press F5 or select `Debug > Start Debugging`.
39+
40+
> **Important**: Before deploying or running the sample, please make sure your device is visible in the Device Explorer.
41+
> **Tip**: To display the Device Explorer, go to Visual Studio menus: `View > Other Windows > Device Explorer`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# WebSocket Server Sample
2+
3+
Shows how to use the WebSockets related APIs in [System.Net.WebSockets](http://docs.nanoframework.net/api/System.Net.WebSockets.html). Documentation on the Websocket library can be found in the [WebSockets Repo](https://github.com/nanoframework/System.Net.WebSockets).
4+
5+
## Sample
6+
7+
This sample shows howto use Websocket Server with a Webserver hosting a WebApp that controlls a rgb led.
8+
9+
## Hardware requirements
10+
11+
This Sample was written for the [M5Stack ATOM Lite](https://shop.m5stack.com/products/atom-lite-esp32-development-kit) device, but can be easily changed to another board connected to a rgb led.
12+
13+
## Related topics
14+
15+
### Reference
16+
17+
- [nanoFramework.Net.WebSockets](https://github.com/nanoframework/System.Net.WebSockets/blob/develop/README.md)
18+
- [System.Net.WebSockets](http://docs.nanoframework.net/api/System.Net.WebSockets.html)
19+
- [getting started guide](https://www.feiko.io/posts/2022-01-03-getting-started-with-net-nanoframework)
20+
21+
## Building the samples
22+
23+
1. Start Microsoft Visual Studio 2022 (VS 2019 and VS 2017 should be OK too) and select `File > Open > Project/Solution`.
24+
2. Starting in the folder where you unzipped the samples/cloned the repository, go to the subfolder for this specific sample. Double-click the Visual Studio Solution (.sln) file.
25+
3. Change the WiFi Ssid and Password on line 22 and 23.
26+
4. Press `Ctrl+Shift+B`, or select `Build > Build Solution`.
27+
28+
## Run the sample
29+
30+
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
31+
32+
### Deploying the sample
33+
34+
- Select `Build > Deploy Solution`.
35+
36+
### Deploying and running the sample
37+
38+
- To debug the sample and then run it, press F5 or select `Debug > Start Debugging`.
39+
- The debug output will show the url of the WebApp. Make sure you're connected to the same network as the device and open this url in your browser.
40+
- Set the mood by changing the color of the rgb led using the WebApp.
41+
42+
> **Important**: Before deploying or running the sample, please make sure your device is visible in the Device Explorer.
43+
> **Tip**: To display the Device Explorer, go to Visual Studio menus: `View > Other Windows > Device Explorer`.

0 commit comments

Comments
 (0)