You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shows how to use UdpClient API in various situations.
4
+
5
+
## Hardware requirements
6
+
7
+
An hardware device running a nanoFramework image with networking capabilities enabled.
8
+
9
+
## Samples provided
10
+
11
+
Three samples are provided:
12
+
-**QOTDClient** : show how to use `UdpClient` as an udp client. It connect to a public `Quote of the day` server and display the result.
13
+
14
+
-**UdpEchoServer** : show how to use `UdpClient` as an udp server. It implements a simple Udp server that listen to messages and echo them back to the sender. You need a companion sender application to test it. The `Sender.ipynb` notebook in the folder can be used with .net interactive in vscode to send messages to the server (check https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode on how to proceed).
15
+
16
+
-**DumpSSDPRequests** : show how to join a multicast group and get multicast messages. This sample display the SSDP messages that are sent by the different devices on the local network.
17
+
18
+
## Build the sample
19
+
20
+
1. Start Microsoft Visual Studio 2019/2022 and select `File > Open > Project/Solution`.
21
+
1. 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.
22
+
1. Press `Ctrl+Shift+B`, or select `Build > Build Solution`.
23
+
24
+
## Run the sample
25
+
26
+
You need to select the sample you want to run. If you want to use wifi, you must include a reference to the `System.Device.WiFi` package, define the HAS_WIFI variable and set your wifi parameters in the code.
27
+
28
+
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
29
+
30
+
### Deploying the sample
31
+
32
+
- Select `Build > Deploy Solution`.
33
+
34
+
### Deploying and running the sample
35
+
36
+
- To debug the sample and then run it, press F5 or select `Debug > Start Debugging`.
37
+
38
+
> **Important**: Before deploying or running the sample, please make sure your device is visible in the Device Explorer.
39
+
40
+
> **Tip**: To display the Device Explorer, go to Visual Studio menus: `View > Other Windows > Device Explorer`.
0 commit comments