1 /** \mainpage The SENF Socket Library
3 The Socket library provides a high level and object oriented
4 abstraction of the BSD socket API. The abstraction is based on
7 \li The basic visible interface is a handle object
8 (senf::FileHandle and it's derived classes)
9 \li The socket interface relies on a policy framework to configure
11 \li The rest of the socket API is accessible using a classic
12 inheritance hierarchy of protocol classes
14 The handle/body architecture provides automatic reference counted
15 management of socket instances, the policy framework provides
16 highly efficient access to the most important socket functions
17 (like reading and writing) and the inheritance hierarchy provides
18 convenient access to the multitude of special and protocol
26 /** \page usage Using the Socket Library
28 \section socket_handle The socket handle
30 Whenever you use the socket library, what you will be dealing with
31 are senf::FileHandle derived instances. The socket library relies
32 on reference counting to automatically manage the underlying
33 socket representation. This frees you of having to manage the
34 socket lifetime explicitly.
36 \attention It is very important, to (almost) always pass the socket
37 handle <em>by value</em>. The socket handle is a very lightweight
38 class and designed to be used like an ordinary built-in type. This
39 is very important in combination with the policy interface.
41 \section policy_framework The policy framework
43 The policy framework conceptually implements a list of parallel
44 inheritance hierarchies each covering a specific interface aspect
45 of the socket handle. The socket handle itself only provides
46 minimal functionality. All further functionality is relayed to a
47 policy class, or more precisely, to a group of policy classes, one
48 for each policy axis. The policy axis are
51 <dt><em>addressingPolicy</em></dt>
52 <dd>configures, whether a socket is
53 addressable and if so, configures the address type</dd>
55 <dt><em>framingPolicy</em></dt>
56 <dd>configures the type of framing the socket provides: either no
57 framing providing a simple i/o stream or packet framing</dd>
59 <dt><em>communicationPolicy</em></dt>
60 <dd>configures,if and how the communication partner is
63 <dt><em>readPolicy</em></dt>
64 <dd>configures the readability of the socket</dd>
66 <dt><em>writePolicy</em></dt>
67 <dd>configures the writability of the socket</dd>
69 <dt><em>bufferingPolicy</em></dt>
70 <dd>configures, if and how buffering is configured for a socket</dd>
75 /** \page extend Extending the Library
78 /** \page implementation Implementation notes
80 \image html "../../SocketLibrary-classes.png" Class hierarchy
89 // ispell-local-dictionary: "american"