SocketTools Libraries
Library Overview
The SocketTools Library Edition provides native APIs and C++ classes for the most commonly used Internet application protocols such as FTP, HTTP, POP3, IMAP4, SMTP and SSH. It also includes libraries for general TCP/IP networking services, parsing MIME e-mail messages, executing remote commands, interactive terminal sessions and much more.
The Web Services library provides a private cloud storage API for uploading and downloading shared data files which are available to your application. This is primarily intended for use by developers to store configuration information and other data generated by the application. For example, you may want to store certain application settings, and the next time a user or organization installs your software, those settings can be downloaded and restored.
The SocketTools DNS library enables applications to resolve domain names into Internet addresses using the Domain Name Service protocol. It can also provide other information about a domain, such as the name of the mail servers which are responsible for receiving e-mail for users in that domain. This library can be used to query one or more specific nameservers directly, without depending on the default DNS configuration of the local system.
The SocketTools File Encoding library provides functions for encoding and decoding binary files, compressing and encrypting data. Data encryption uses AES-256 and the encryption keys are generated using SHA-256. Encoding converts the contents of a compressed and/or encrypted file to printable text. Decoding reverses the process, converting a previously encoded text file back into its original form. The library supports a number of different encoding methods, including support for the base64, uucode, quoted-printable and yEnc algorithms.
The SocketTools FTP client library provides methods for uploading and downloading files from a remote host, as well as a variety of remote file management methods using the File Transfer Protocol. In addition to file transfers, an application can create, rename and delete files and directories, list files and search for files using wildcards. The library provides high level methods, such as the ability to transfer multiple files in a single method call, as well as access to lower level remote file I/O methods. Both standard and secure file transfers are supported using SSH (SFTP) and TLS (FTPS).
The SocketTools FTP server library implements a complete, event-driven multithreaded server that can be embedded in your application. It can be used to provide direct access to files, as well as serve as a remote management mechanism using a standard protocol that is widely supported. Designed to work either in a typical desktop application or within a Windows service, the server operates in the background and can support multiple simultaneous client connections. The server supports both standard and secure connections using TLS 1.2. It also provides advanced features such as user isolation, local authentication and support for the SITE EXEC command to allow the execution of external programs and scripts.
The Web Services library provides an API for obtaining geographical information about the physical location of the computer system based on its external IP address. This can enable developers to know where their application is being used, and provide convenience functionality such as automatically completing a form based on the location of the user.
The SocketTools HTTP client library provides an interface for accessing documents and other resources on a server using the Hypertext Transfer Protocol. In some ways it is similar to the File Transfer Protocol (FTP) in that it can be used to upload and download files; however, the protocol has expanded to also support remote file management, script execution and distributed authoring over the World Wide Web. The library implements version 0.9, 1.0 and 1.1 of the protocol, including features such as support for proxy servers, persistent connections, user-defined header fields and chunked data. Both standard and secure connections are supported using SSL and TLS (HTTPS).
The SocketTools HTTP server library implements a multithreaded, event-driven server that can be embedded in your application. It can be used to provide your software with a web interface that is directly under the control of your software, without depending on a third-party installation of a web server such as IIS or Apache. You can use the library to enable users to manage the application remotely, perform administrative tasks or access data that is dynamically generated by the application. The library can be used in a standard desktop application or a Windows service, and is highly configurable. The server supports both standard and secure connections using SSL and TLS, along with features such as virtual folders, local user authentication and support for CGI programs and scripting languages like VBScript.
The SocketTools ICMP library implements the Internet Control Message Protocol and can be used to check if a system is reachable or determine how packets of data are routed to that system. Users are most familiar with this protocol as it is implemented in the ping and tracert command line utilities. The ping command is used to check if a system is reachable and the amount of time that it takes for a packet of data to make a round trip from the local system, to the remote host and then back again. The tracert command is used to trace the route that a packet of data takes from the local system to the remote host, and can be used to identify potential problems with overall throughput and latency. The library can be used to build in this type of functionality in your own applications, giving you the ability to send and receive ICMP echo datagrams in order to perform your own analysis.
The SocketTools IMAP library is used to access a user’s e-mail messages which are stored on a mail server using the Internet Message Access Protocol. Unlike the Post Office Protocol (POP3) where messages are downloaded and processed on the local system, the messages on an IMAP server are retained on the server and processed remotely. This is ideal for users who need access to a centralized store of messages or have limited bandwidth. For example, traveling salesmen who have notebook computers or mobile users on a wireless network would be ideal candidates for using IMAP. The library provides methods to retrieve messages, or just certain parts of a message, create and manage mailboxes, and search for specific messages based on certain criteria. The library supports both standard and secure connections using SSL and TLS.
The SocketTools MIME library provides an interface for composing and processing e-mail messages and newsgroup articles which are structured according to the Multipurpose Internet Mail Extensions standard. Using this library, an application can easily create complex messages which include multiple alternative content types, such as plain text and styled HTML text, file attachments and customized headers. It is not required that the developer understand the complex MIME standard; a single function call can be used to create a multipart message, complete with a styled HTML text body and support for international character sets. The Mail Message library can be easily integrated with the other mail related protocol libraries, making it extremely easy to create and process MIME formatted messages.
The SocketTools NNTP library is used to access servers that provide news services using the Network News Transfer Protocol. This is similar in functionality to bulletin boards or message boards, where topics are organized hierarchically into groups, called newsgroups. Users can browse and search for messages, called news articles, which have been posted by other users. On many servers, they can also post their own articles which can be read by others. The largest collection of public newsgroups available is called USENET, a world-wide distributed discussion system.
The library provides a comprehensive interface for accessing newsgroups, retrieving articles and posting new articles. In combination with the MIME library to process the news articles, it can be used to integrate newsgroup access with an existing e-mail application, or you can implement your own full-featured newsgroup client. The library supports both standard and secure connections using SSL and TLS.
The SocketTools POP3 library provides access to a user’s new e-mail messages on a mail server using the Post Office Protocol v3. Methods are provided for listing available messages and then retrieving those messages, storing them either in files or in memory. Once a user’s messages have been downloaded to the local system, they are typically removed from the server. This is the most common e-mail protocol used by Internet Service Providers and the library provides a complete interface for managing a user’s mailbox. It is typically used in conjunction with the MIME library, which can be used to process the messages that are retrieved from the server. The library supports both standard and secure connections using SSL and TLS.
The SocketTools RSH library is used to execute commands on a server and return the output of that command to the client. This is most commonly used with UNIX based servers, although there are implementations of remote command servers for the Windows operating system. The library supports both the rcmd and rshell remote execution protocols and provides methods which can be used to search the data stream for specific sequences of characters. This makes it extremely easy to write Windows applications which serve as light-weight client interfaces to commands being executed on a UNIX server or another Windows system. The library can also be used to establish a remote terminal session using the rlogin protocol, which is similar to the Telnet protocol. It should be noted that these protocols are not considered secure, and should only be used over a trusted local network. For secure access to a remote server, it is recommended that you use the SSH library.
The SocketTools SMTP library enables applications to deliver e-mail messages to one or more recipients using the Simple Mail Transfer Protocol. The library provides an interface for addressing and delivering messages, and extended features such as user authentication and delivery status notification. Messages can be delivered directly to the recipient, or they can be routed through a relay server, such as a service provider's mail system. In combination with the MIME library, it provides an extremely simple, yet flexible interface for composing and delivering mail messages. This library supports both standard and secure connections using SSL and TLS.
The SocketWrench library provides a higher-level interface to the native sockets library, enabling developers to easily incorporate Internet functionality in their applications. It supports both the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), can be used to create both client and server applications, and provides support for secure connections using SSL and TLS. With SocketWrench you can implement your own custom protocols and easily connect to other services.
SocketWrench also includes a general purpose, multithreaded server framework that can be used to create a custom server application. The server can accept multiple simultaneous client connections, and can be used with a typical desktop application or as part of a Windows service. The library interface is event driven, where your program simply implements its own event handlers to process the data sent by clients and respond to them. All of the client sessions are managed by the library, and it will not interfere with the main (UI) thread of the application which can perform its own tasks while the server is operating in the background. The library supports IPv4 and IPv6 network connections, and it can be configured to use either standard or secure connections using the SSL and TLS protocols.
The SocketTools SSH library enables an application to establish a secure connection to a server using the Secure Shell protocol and either execute commands or begin an interactive terminal session. SSH is commonly used for remote logins where users interact with the server using a command-line interface, or to access a control interface for devices such as routers. It can also be used to execute commands remotely, returning the output back to the application. The library supports both the SSH-1 and SSH-2 protocols, and can be used in conjunction with the Terminal Emulation library, which provides ANSI and DEC VT terminal emulation for interactive sessions.
The SocketTools TELNET client library is used to establish a connection with a server using the TELNET protocol, which provides a virtual terminal session for a user. Its functionality is similar to how character based consoles and serial terminals work, enabling a user to login to the server, execute commands and interact with applications running on the remote host. The library provides an interface for establishing the connection, negotiating certain options (such as whether characters will be echoed back to the client) and handling the standard I/O functions needed by the program. It can be combined with the Terminal Emulation library to provide complete terminal emulation services for a standard ANSI or DEC-VT terminal. This library supports both standard and secure connections using SSL and TLS. For secure connections using the SSH protocol, applications should use the SSH library.
The Terminal Emulation library provides a comprehensive interface for emulating an ANSI or DEC-VT100/220/320 character terminal, with full support for all standard escape and control sequences, color mapping and other advanced features. The library methods provide both a high level interface for parsing escape sequences and updating a display, as well as lower level primitives for directly managing the virtual display, such as controlling the individual display cells, moving the cursor position and specifying display attributes. Typically, this library is used in conjunction with the SSH or Telnet libraries to provide terminal emulation services for an application.
The SocketTools WHOIS library provides an interface for requesting information about an Internet domain name using the WHOIS protocol. When a domain name is registered, the organization that registers the domain must provide certain contact information along with technical information such as the primary name servers for that domain. This library can be used to request that information and return it to the application so that it can be displayed or processed.