I'm sure a bunch of C++ people who despise the C way of doing things will hate me for this, but the classical approach is to use the Berkeley socket APIs (so-called because they have their origins in BSD). If you're targeting Windows, the "largely-source-compatible, inspired-by-Unix" APIs are called Winsock. I'd say do a web search for socket tutorial and you will probably get some useful information. With a little care and maybe an #ifdef or two, it's not so hard to create code which works on Linux, BSD, Mac (which provide BSD sockets) and Windows (with Winsock) using what's common between these two interfaces.
For the more C++ inclined, less C-style people, or those who don't like to code against OS APIs, I'm sure there are C++ libraries out there that provide wrappers and abstractions for these same concepts. Since Boost seems to be pretty popular, I'd say see what they have.
answered 2010-10-02T19:00:42.277