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.

ExampleDescription
CheckMailConnects to a mail server using the POP3 protocol, lists and views the email messages stored in the user’s inbox.
EchoClientDemonstrates 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.
EchoServerDemonstrates 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.
EncryptDemonstrates using the AES encryption APIs to encrypt and decrypt files and data, as well as encrypt text which can be stored as strings configuration files or the system registry.
FileTransferDemonstrates 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.
FtpServerDemonstrates 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.
GetFileDemonstrates 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.
HttpServerDemonstrates 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.
ListFilesDemonstrates 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).
ListMailDemonstrates 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.
LocationDemonstrates how to use the GeoIP location service API to obtain information about the physical location of the local computer system.
MailboxDemonstrates 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.
ResolveDemonstrates 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.
RexecDemonstrates 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.
SendMailDemonstrates 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.
TelcmdDemonstrates 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.
TelnetDemonstrates 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.
TextMessageDemonstrates 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.
ViewPageDemonstrates 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.
WebStorageDemonstrates how to open storage containers, upload files to the container and then download the stored objects to the local computer system.