These code snippets can be copied and pasted into your project.
| Tcp Echo Client
||Demonstrates how to connect, send and receive data in a windows forms application.
| Worker Thread Server
||Demonstrates how to write a server that dedicates a worker thread for each client.
| Async Server
||Demonstrates how to write a server that utilizes on-demand IO completion threads.
| UDP Multicast
||Demonstrates how to join a multicast group asynchronously, without blocking the UI.
| Ping Remote Host
||Demonstrates how to ping a remote host asynchronously, without blocking the UI.
| DNS Mail Host Lookup
||Demonstrates how lookup mail hosts associated with an email address asynchronously, without blocking the UI.
Samples are working applications demonstrating Sockets for .NET components in C#, VB.NET and C++/CLI. Source code included.
||Demonstrates a client used for resolving domain names, IP addresses and mail address hosts.
||Demonstrates a client used for determining if a host is reachable.
||Implements a test proxy server that supports SSL tunneling, as well as Socks and Http proxy servers.
||Server implements several protocols with two modes of operation ("sync" using dedicated worker threads and "async" using IO completion threads).
|Server Windows Service
||Demonstrates a server that runs as a windows service.
||Uses the PowerTCP Sockets Server class to demonstrate an echo server with a minimal amount of code.
||Demonstrates a client which communicates with hosts using TCP with optional proxy and SSL use.
|TCP Client Task Async
||Uses awaitable task methods to communicate with hosts using TCP with optional proxy and SSL use.
|Trace Route Client
||Demonstrates a client that traces a route to any host.
|UDP Chat Client
||Uses UDP multicasting or broadcasting to chat with other users on the network.
|UDP Chat Client Task Async
||Uses the awaitable task methods of the UDP class to demonstrate multicasting or broadcasting to chat with other users on the network.
||Demonstrates Network Time Protocol (NTP) over UDP on both client- and server-side.
|Ping Web Client
||Demonstrates a web page that can be used to ping other hosts.
|TCP Echo Web Client
||Uses the Tcp component in ASP.NET to communicate with an echo server.
Download the Sockets for .NET Sample Projects
After downloading, you will need to unblock the zip before extracting it: locate the zip in Windows explorer, right-click on it, select 'Properties', and click the 'Unblock' button in the bottom-right corner of the General tab.
This will resolve the compile-time exception 'Could not load file or assembly 'Dart.*****' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'.