SocketTools .NET Edition Examples

The SocketTools .NET Edition includes examples for both Visual Basic and C# installed in the Documents folder for the current user. The functionality for each of the examples is similar, with the only difference being the language that they are implemented in. To use these examples, you must have the SocketTools .NET Edition installed, either with a valid evaluation or development license.

Example Protocols Description
AsyncIO TCP Demonstrates the use of an asynchronous socket to establish a non-blocking connection with a server and exchange data by responding to event notifications.
CheckMail POP3 Connects to a mail server using the POP3 protocol, lists and views the email messages stored in the user’s inbox.
Dialer RAS, PPP Uses Remote Access Services to establish a dialup networking connection to an Internet service provider.
EchoClient TCP Demonstrates establishing a TCP connection to an echo service using the SocketWrench class. The server sends back a copy of the data that is sent to it by the client and is a useful starting point for many client applications.
EchoServer TCP Demonstrates creating a multithreaded TCP server that accepts connections from multiple clients and sends back a copy of whatever data those clients send to the server. This example is a useful starting point for many server applications and can be used in conjunction with the EchoClient example.
FileTransfer FTP, FTPS, SFTP Demonstrates establishing a connection to a file server to upload and download files. This example supports standard FTP connections and secure connections using FTPS (FTP+SSL) and SFTP (SSH). The example also demonstrates how to use events to update the UI.
FtpServer FTP, FTPS Demonstrates a multithreaded FTP server that accepts both standard and secure (SSL/TLS) connections. It provides a complete standards compliant implementation of the protocol along with the ability to extend the protocol with custom commands.
GetPage HTTP, HTTPS Demonstrates how to create an HTTP connection and retrieve the contents of a resource (such as an HTML page) on a web server. This example can be a useful starting point for applications that need to access files on a web server.
HttpServer HTTP, HTTPS Demonstrates a multithreaded HTTP server that accepts both standard and secure (SSL/TLS) connections. It provides a complete standard compliant implementation of the protocol along with the ability to extend the protocol with custom commands.
ListFiles FTP, FTPS, SFTP Demonstrates how to connect to a file server and obtain a list of available files. This example supports standard FTP connections, as well as secure connections using FTPS (FTP+SSL) and SFTP (SSH).
ListMail IMAP4 Demonstrates how to connect to a mail server and list the messages in a specified mailbox. This example uses the IMAP4 protocol and supports both standard and secure connections.
NetTime TIME Demonstrates how to connect to a time server on the Internet. The example uses the standard NIST time servers to obtain the current date and time. Note that changing the current system time requires administrative privileges.
Ping ICMP Demonstrates how to send an ICMP ECHO datagram to a remote host to determine if the system is accessible over the Internet or a local network. Note that not all systems respond to ICMP datagrams, and your firewall may block the replies sent by the remote host.
QueryIP UDP Demonstrates how to broadcast a UDP datagram to request the IP address assigned to a specific system. This example is designed to be used in conjunction with the ServerIP example running on the target system.
RemoteShell RSH Demonstrates how to establish a remote shell (RSH) connection to a server and issue a command. The output of the command is then returned to the client for processing.
Resolve DNS Demonstrates how to resolve a hostname to an IP address and obtain the servers that are responsible for handling mail for the domain. This example uses the DNS protocol to query a nameserver for A and MX records.
SecureClient TCP, SSL, TLS Demonstrates establishing a secure SSL/TLS connection to a server using the SocketWrench class. This example would typically be used in conjunction with the SecureServer example and is a useful starting point for many applications that need to create secure client connections.
SecureServer TCP, SSL, TLS Demonstrates creating a multithreaded server that accepts secure (SSL/TLS) connections and sends back a copy of whatever data is received from the client. This example would typically be used in conjunction with the SecureClient example and is a useful starting point for many applications that need to create a secure server.
SendMail SMTP, MIME Demonstrates connecting to a mail server using SMTP to submit a message for delivery to one or more recipients. This example also demonstrates how to create standard MIME formatted email messages with file attachments.
ServerIP UDP Demonstrates how to create a UDP socket that listens for a broadcast datagram and returns its current IP address to the system that originated the message. This example is used in conjunction with the QueryIP example.
Terminal TELNET Demonstrates how to establish a Telnet connection to a server and implement an interactive client session. The example also uses the terminal emulation component to emulate an ANSI or DEC VT220 terminal.
TextMessage SMS, SMTP Demonstrates how to send a text message through a service provider SMTP gateway. This example can provide a starting point for applications that need to send SMS notification messages to mobile devices.
TraceRoute ICMP Demonstrates how to generate a traceroute from the local host to a remote system. This uses a series of ICMP ECHO datagrams to trace the route that a packet takes to its destination.
UdpEcho UDP Demonstrates how to create a UDP socket and exchange messages with a remote host. This example requires a server that accepts UDP echo datagrams and returns a copy of the data back to the sender.
UdpListener UDP Demonstrates how to create a UDP socket, wait for incoming messages and respond to the sender. It can be a useful starting point for creating an application that must listen for datagrams.
ViewPage HTTP, HTTPS Demonstrates how to connect to an HTTP server and request the contents of a resource from the server, such as an HTML or XML document. It can be used as the starting point for an application that must request documents from a web server.
WebTransfer HTTP, HTTPS Demonstrates how to connect to an HTTP server and upload or download a file. This example also shows how to update a UI progress bar during the transfer by implementing an event handler. It can serve as the starting point for an application that needs to perform file transfers using HTTP.
WhoIs WHOIS Demonstrates how to connection to and query a WHOIS server for information about the ownership of a domain name. This can include the name of owner, the domain name registrar and related information.