OpenTop Networking
Developing portable, resilient and secure C++ network applications is
significantly easier and more productive when using OpenTop.
OpenTop's networking facilities operate at several levels, simultaneously
allowing precise control at the socket level as well as providing
a simple yet powerful and standards-compliant implementation of higher-level
application protocols.
Network Sockets
OpenTop's networking facilities are built around its
extremely robust and portable family of
Socket
classes. These classes implement a C++ wrapper around the socket API
of the underlying platform and provide robust error handling
as well as smoothing any inconsistencies between platforms.
Classes are provided for TCP/IP
client and
server
sockets as well as UDP
datagram and
multicast
sockets. These classes offer applications a fine degree of control, exposing
a common set of configuration options on all platforms. This includes
the provision of a configurable timeout to limit the maximum duration an
I/O operation will be allowed to wait before returning control
to the caller.
Hostname Resolution
Hostname resolution is the process of translating a network name, such as
www.elcel.com, into an IP address which can be used as the endpoint
for a socket connection.
OpenTop provides the abstract
InetAddress
interface which is used to represent version-independent IP addresses
in addition to providing a number of static methods for resolving names to addresses
and visa versa.
The use of a version-independent class to represent IP addresses
prepares the way for a painless transition to IPv6 addresses when support for
this technology is more widely available.
Uniform Resource Locator (URL) Handling
OpenTop was first conceived to address the problem of accessing
resources from URLs and the so-called World Wide Web. So, it should
come as no surprise that this is a task at which it excels.
OpenTop contains a family of classes which perform everything you're
ever likely to need for URL handling. At the top of the stack is the
URL class itself. This
provides the ability to parse, manipulate and compare URL strings.
The other important class is
URLStreamHandler,
which is actually an abstract interface defining methods to handle protocol-specific
tasks. This gives OpenTop the ability to handle any kind of URL and allows
for future growth and custom extension.
OpenTop is supplied with concrete implementations of URLStreamHandler for FILE,
FTP and HTTP(S) URLs.
If you need more control, OpenTop provides a full-featured
FtpClient class
as well as the extensive HTTP facilities contained in the web namespace.