SocketTools Library Edition Examples

The SocketTools Library Edition includes examples for Visual C++, Visual Basic and PowerBASIC 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 Library Edition installed, either with a valid evaluation or development license.

Example Protocols Description
CheckMail POP3 Connects to a mail server using the POP3 protocol, lists and views the email messages stored in the user’s inbox.
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.
GetFile FTP Demonstrates how to connect to a file server and download a file. This example is console based and shows the simplest code required to perform a file transfer without a user interface.
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 POP3 Demonstrates how to connect to a mail server and list the messages in a specified mailbox. This example uses the POP3  protocol and supports both standard and secure connections.
Mailbox IMAP4 Demonstrates how to connect to a mail server and list the messages in a specified mailbox. This example is similar to the ListMail example, however it uses the IMAP4 protocol and supports both standard and secure connections.
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.
Rexec RSH, REXEC Demonstrates how to connect to a server using the REXEC protocol, execute a command remotely and return the output to the client. Note that it is recommended that most applications use SSH rather than this protocol.
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.
Telcmd TELNET Demonstrates how to establish a Telnet connection to a server, issue a command and return the output to the client. This example is a console mode application that demonstrates how to use the API without a user interface.
Telnet 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.
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.