senf::ConcreteSocketProtocol< SocketPolicy, Self > Class Template Reference
[The Protocol Classes]

Concrete Socket Protocol implementation base class. More...

#include <senf/Socket/SocketProtocol.hh>

Inheritance diagram for senf::ConcreteSocketProtocol< SocketPolicy, Self >:
Inheritance graph
[legend]

List of all members.


Detailed Description

template<class SocketPolicy, class Self>
class senf::ConcreteSocketProtocol< SocketPolicy, Self >

Concrete Socket Protocol implementation base class.

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.

Documentation request:
init_client init_server

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.

Member Typedef Documentation

template<class SocketPolicy, class Self>
typedef SocketPolicy senf::ConcreteSocketProtocol< SocketPolicy, Self >::
Policy

The protocols policy.

Definition at line 282 of file SocketProtocol.hh.


Constructor & Destructor Documentation

template<class SocketPolicy , class Self >
senf::ConcreteSocketProtocol< SocketPolicy, Self >::~
~ConcreteSocketProtocol ()

Definition at line 39 of file SocketProtocol.cti.


Member Function Documentation

template<class SocketPolicy , class Self >
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.

template<class SocketPolicy , class Self >
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.

template<class SocketPolicy , class Self >
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.


The documentation for this class was generated from the following files: