The de facto standard API for networking is the sockets interface. It was created for Berkley Unix, and has become the standard interface. The Cleansocks library provides a C++-based interface to the standard sockets designed to preserve the concepts and procedures of the sockets library, while attempting to hide some of the C-ish grunginess. Users can declare sockets by type, use them to listen and connect, send and receive, and generally apply the usual socket operations, avoiding much of the low-level code needed to create and configure them.
Cleansocks provides a couple of convenient extensions. A simple one which buffers inbound data, mainly to allow reading line by line, and a more complex one that supports creation of TLS client connections.
And cleansocks reports errors using exceptions, which simplifies coding and make errors harder to miss and easier to locate.
All objects and methods described in these pages are in the namespace cleansocks. You'll need to qualify names, or use some form of the using directive.
Cleansocks is developed primarily on Linux, but made to work on Windows (over Winsock) as well, and it hides the differences between those two platforms. It should build easily enough on other Unix-like platforms.