libsocket
|
As libsocket is built as shared library, it's not really hard to use.
The header files are placed by default to /usr/include/libsocket
(you may want to change that, especially on BSD). This directory should be contained in your compiler's include path, so just say (if you want to build an application using UNIX client stream sockets):
# include <libsocket/unixclientdgram.hpp>
The classes are contained in these header files:
CLASS HEADER FILE ---------------------------------------------------- inet_stream inetclientstream.hpp inet_stream_server inetserverstream.hpp inet_dgram_client inetclientdgram.hpp inet_dgram_server inetserverdgram.hpp unix_dgram_client unixclientdgram.hpp unix_dgram_server unixserverdgram.hpp unix_stream_client unixclientstream.hpp unix_stream_server unixserverstream.hpp selectset select.hpp epollset epoll.hpp [libinetsocket] libinetsocket.h [libunixsocket] libunixsocket.h
If you let the Makefile place the shared object to a default library path like /usr/lib
, /lib
, /usr/local/lib
, you need to link your programs with the following switches:
$CC -lsocket ...
$CXX -lsocket++ ...