Modules | |
Protocol Implementations (Concrete Protocol Classes) | |
Protocol Facets | |
Classes | |
class | senf::SocketProtocol |
Socket Protocol base class. More... | |
class | senf::ClientSocketHandle< SPolicy > |
Generic SocketHandle with client interface. More... | |
class | senf::ServerSocketHandle< SPolicy > |
Generic SocketHandle with server interface. More... | |
class | senf::ConcreteSocketProtocol< SocketPolicy, Self > |
Concrete Socket Protocol implementation base class. More... | |
The socket handle classes and templates only implement the most important socket API methods using the policy framework. To access the complete API, the protocol interface is provided. Access to the protocol interface is only possible via senf::ProtocolClientSocketHandle and senf::ProtocolServerSocketHandle which have the necessary protocol()
member. This member returns a reference to the protocol class instance which contains members covering all the API functions (mostly setsockopt/getsockopt related calls but there may be more, this is completely up to the implementor of the protocol class) not found in the SocketHandle interface. The protocol interface is specific to the protocol. It's implementation is quite free. The standard protocols are implemented using a simple multiple-inheritance hierarchy as shown above.
Since the protocol class is protocol specific (how intelligent ...), the protocol class also defines the complete socket policy to be used with it's protocol. Complete meaning, that every policy axis must be assigned it's the most specific (that is derived) policy class to be used with the protocol and that no policy axis is allowed to be left unspecified.