Network Programming with Sockets

Sockets appeared in Berkeley Unix (BSD = Berkeley Software Distribution) for the first time. For that reason, they are also called Berkeley Sockets. Since Berkely Sockets were implemented in Unix Systems originally, they have a long history connected with Unix history. In the meantime, the BSD Sockets idea proofed to be good enough for other operating systems as well and so they are also available on other popular systems like Windows.

The term Socket has two meanings.

For the application programmer, the socket is "visible" as a File Descriptor. The Programmer can treat a socket similar to a file and apply read(), write(), ioctl(), ... on it. This is the strength of the concept, but on the other hand a TCP connection is not a file and this difference maks socket Programming a bit tricky. It is not too hard to get something to work in reasonable time (please see also the Examples section), but to achieve ~ 100% reliability one needs a little bit of experience.

Socket Library

Network Programming is calling for a framework that addresses all the lower level issues so the application programmer can focus on the higher level problems. C++ World have developed their own C++ socket library, you can learn more about it here.

Literature


C++ World