SocketPolicy.hh File Reference

Policy Framework public header. More...

#include "SocketPolicy.ih"
#include "SocketPolicy.ct"
Include dependency graph for SocketPolicy.hh:

Go to the source code of this file.

Classes

struct  senf::AddressingPolicyBase
 Policy defining socket addressing. More...
 
class  senf::AddressingPolicyBase::Address
 
struct  senf::FramingPolicyBase
 Policy defining the framing format. More...
 
struct  senf::CommunicationPolicyBase
 Policy defining, how peers are selected. More...
 
struct  senf::ReadPolicyBase
 Policy defining the readability. More...
 
class  senf::ReadPolicyBase::Buffer
 
struct  senf::WritePolicyBase
 Policy defining the writability. More...
 
class  senf::WritePolicyBase::Buffer
 
struct  senf::AddressingPolicyIs< SocketPolicy, Trait >
 Check single policy axis. More...
 
struct  senf::IfAddressingPolicyIs< SocketPolicy, Trait >
 Enable template overload depending on policy value. More...
 
struct  senf::IfAddressingPolicyIsNot< SocketPolicy, Trait >
 Inversion of IfAddressingPolicyIs. More...
 
struct  senf::SocketPolicyBase
 Baseclass of all SocketPolicies. More...
 
struct  senf::SocketPolicy< AddressingPolicy >
 Collection of policy classes. More...
 
struct  senf::MakeSocketPolicy< Arg1, Arg2, ArgN >
 Metafunction to create SocketPolicy. More...
 
struct  senf::SocketPolicyIsBaseOf< Base, Derived >
 Check policy compatibility. More...
 

Namespaces

 senf
 

Macros

#define SENF_SOCKET_POLICIES
 List all policy axis. More...
 

Typedefs

typedef AddressingPolicyBase senf::UnspecifiedAddressingPolicy
 Alias of AddressingPolicyBase for better readability. More...
 

Detailed Description

Policy Framework public header.

Idea:
Creating a new Socket will create 3 new instances (The handle, the body, the policy) of which 2 (argh) (body, policy) live on the heap. This is expensive. We should convert all the policy classes to singletons and assign the same instance to all socket bodies with the same policy. This would reduce the number of heap allocations per socket handle to one (which is already optimized using the pool_alloc_mixin)

Definition in file SocketPolicy.hh.