Since C++ is on a much lower level Socket programming makes use of sockets implemented for each Operating System
Although C++ makes it easier than Java or .NET to work directly with low level C code, generally there is no reason that you should.
However as Khatharr mentioned, the sockets API on most platforms is very similar (Mainly because Winsock was designed based on BSD sockets a long time ago).
This combined with the fact that using the sockets API directly isn't that difficult (i.e not too much boilerplate code required to get quick results) so I probably suggest wrapping your own socket library. I could give you a link to loads of premade socket libraries but personally I dislike using other peoples wrappers for this kind of thing.
Below is a list of simple examples. I use these as a basis for my own netcode.
Server - http://msdn.microsoft.com/en-us/library/windows/desktop/ms737593%28v=vs.85%29.aspx
Client - http://msdn.microsoft.com/en-us/library/windows/desktop/ms737591%28v=vs.85%29.aspx
POSIX / BSD / UNIX Sockets
Server - http://www.linuxhowtos.org/data/6/server.c
Client - http://www.linuxhowtos.org/data/6/client.c
Of course there is also Boost.Asio if you want to use a pseudo standard library (Akin to .NET and Java sockets).
For UDP, have a look at the simple examples here - en.wikipedia.org/wiki/Berkeley_sockets
Edited by Karsten_, 06 September 2013 - 03:05 AM.