libsocket
|
This documentation is targeted at people who want to gain deeper insight into the libsocket source code. Normal library users should use the documentation provided in the doc/libsocket and doc/libsocket++ directories!
This is the documentation for the C and C++ library libsocket. libsocket is intended to simplify the use of internet and UNIX sockets. Information about how to build libsocket are placed here, and this page tells you how to use libsocket in your applications.
To get started with libsocket for C, take a look at the hand-crafted documentation.
Detailed documentation is available here: libinetsocket; libunixsocket.
libsocket++ should also be easy to understand but it has a quite sophisticated class hierarchy.
libsocket++ consists of many C++ classes. Only the following are intended for use in external applications:
If a function fails, it throws a socket_exception
object containing the error. Look here for detailed information. Therefore it's important to put libsocket++ operations inside try {...} catch () {...}
blocks.
Libsocket++ uses C++11 to delete the copy constructors of the socket classes. This enables the destructor to safely close the socket; to pass a socket to other functions use call-by-reference, call-by-pointer or std::move
and an rvalue-accepting function type:
Detailed documentation can be found in this doxygen documentation; easier documentation is available here