[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Overview of Socket++ Library

Socket++ library defines a family of C++ classes that can be used more effectively than directly calling the underlying low-level system functions. One distinct advantage of the socket++ is that it has the same interface as that of the iostream so that the users can perform type-safe input output. See your local IOStream library documentation for more information on iostreams.

streambuf counterpart of the socket++ is sockbuf. sockbuf is an endpoint for communication with yet another sockbuf or simply a socket descriptor. sockbuf has also methods that act as interfaces for most of the commonly used system calls that involve sockets. See section 2. sockbuf Class, for more information on the socket buffer class.

For each communication domain, we derive a new class from sockbuf that has some additional methods that are specific to that domain. At present, only unix and inet domains are supported. sockunixbuf class and sockinetbuf class define the unix and inet domain of sockets respectively. See section 6. sockunixbuf Class, for unix sockets and See section 4. sockinetbuf Class, for inet sockets.

We also have domain specific socket address classes that are derived from a common base class called sockAddr. sockunixaddr class is used for unix domain addresses and sockinetaddr class is used for inet domain addresses. For more information on address classes see 3. sockAddr Class, 7. sockunixaddr Class, and 5. sockinetaddr Class.

Note: sockAddr is not spelled sockaddr in order to prevent name clash with the struct sockaddr declared in `<sys/socket.h>'.

We noted earlier that socket++ provides the same interface as the iostream library. For example, in the internet domain, we have isockinet, osockinet, and iosockinet classes that are counterparts to istream, ostream, and iostream classes of IOStream library. For more details on iosockstream classes see See section 8. sockstream Classes.

The services of pipe(), socketpair(), and popen() system calls are provided by the pipestream class. See section 9. pipestream Classes.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Herbert Straub on June, 15 2005 using texi2html