#include <senf/Socket/SocketProtocol.hh>
ConcreteSocketProtocol is the base class of a concrete socket protocol implementation. The final protocol class must inherit from ConcreteSocketProtocol. The template argument SocketPolicy must be set to the complete socket policy of the protocol. Self is the name of the final protocol class which inherits this class.
A protocol implementation may define the protocol interface directly. It can also (additionally) make use of multiple inheritance to combine a set of protocol facets into a specific protocol implementation (i.e. TCPv4SocketProtocol inherits from ConcreteSocketProtocol and from the protocol facets IPv4SocketProtocol, TCPSocketProtocol, BSDSocketProtocol and AddressableBSDSocketProtocol). The protocol facets are not concrete protocols themselves, they are combined to build concrete protocols. This structure will remove a lot of code duplication. It is important to ensure, that the protocol facets do not overlap, since otherwise there will be problems resolving overlapping members.
Definition at line 275 of file SocketProtocol.hh.
Public Types |
|
typedef SocketPolicy | Policy |
The protocols policy. |
|
Public Member Functions |
|
Policy const & | policy () const |
Access the policy instance. |
|
Structors and default members |
|
~ConcreteSocketProtocol ()=0 | |
Protected Member Functions |
|
ClientSocketHandle< Policy > | clientHandle () const |
Get client handle for associated socket. |
|
ServerSocketHandle< Policy > | serverHandle () const |
Get server handle for associated socket. |
typedef SocketPolicy senf::ConcreteSocketProtocol< SocketPolicy, Self >:: | ||||
Policy | ||||
The protocols policy.
Definition at line 282 of file SocketProtocol.hh.
senf::ConcreteSocketProtocol< SocketPolicy, Self >::~ | ||||
~ConcreteSocketProtocol | () | |||
Definition at line 39 of file SocketProtocol.cti.
senf::ClientSocketHandle< SocketPolicy > senf::ConcreteSocketProtocol< SocketPolicy, Self >:: | ||||
clientHandle | () | |||
Get client handle for associated socket.
Returns a client handle for the socket associated with this protocol instance
Definition at line 79 of file SocketProtocol.cti.
senf::ConcreteSocketProtocol< SocketPolicy, Self >::Policy const & senf::ConcreteSocketProtocol< SocketPolicy, Self >:: | ||||
policy | () | |||
Access the policy instance.
Implements senf::SocketProtocol.
Definition at line 44 of file SocketProtocol.cti.
senf::ServerSocketHandle< SocketPolicy > senf::ConcreteSocketProtocol< SocketPolicy, Self >:: | ||||
serverHandle | () | |||
Get server handle for associated socket.
Returns a server handle for the socket associated with this protocol instance
Definition at line 87 of file SocketProtocol.cti.