X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketPolicy.hh;h=06d1359b2f32b7df3f77428ece2f471564ce60b3;hb=d2459b6c8249291588fd3d0d125ed3d38e003b55;hp=bc7ffc740d61846e32019a831125ae12bcf98415;hpb=5ed1fa1c42763aebad06c1e4ac8fc5a19e15519a;p=senf.git diff --git a/Socket/SocketPolicy.hh b/Socket/SocketPolicy.hh index bc7ffc7..06d1359 100644 --- a/Socket/SocketPolicy.hh +++ b/Socket/SocketPolicy.hh @@ -1,8 +1,8 @@ // $Id:SocketPolicy.hh 218 2007-03-20 14:39:32Z tho $ // // Copyright (C) 2006 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -23,29 +23,25 @@ /** \file \brief Policy Framework public header - \todo Do we want to support separate read and write policies. This allows to treat pipes within - this framework however, is this worth the effort? - - \idea Creating a new Socket will create 4 (!) new instances (The handle, the body, the policy - and the protocol) of which 3 (argh) (body, policy and protocol) 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 two. + \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) */ /** \defgroup policy_group The Policy Framework - \htmlonly - - SocketPolicy - WritePolicyBase - ReadPolicyBase - CommunicationPolicyBase - FramingPolicyBase - AddressingPolicyBase - - Socket Policy - \endhtmlonly +
+ \ref WritePolicyBase + \ref AddressingPolicyBase + \ref FramingPolicyBase + \ref PolicyBase + \ref SocketPolicy + \ref CommunicationPolicyBase + \ref ReadPolicyBase +
+ \htmlonly SocketPolicy \endhtmlonly \section policy_group_introduction Introduction to the Policy Framework @@ -65,7 +61,7 @@
readPolicy
configures the readability of the socket
-
writePolicy
configures the writability of the socket
+
writePolicy
configures the writability of the socket
The template senf::SocketPolicy combines these policy axis to form a concrete socket policy. In a concrete policy, each of these policy axis is assigned a value, the policy value. This value @@ -210,10 +206,10 @@ \code struct ExampleAddressingPolicy { - template - void connect(senf::SocketHandle handle, Address & addr, + template + void connect(senf::SocketHandle handle, Address & addr, typename senf::IfCommmunicationPolicyIs< - Policy, senf::ConnectedCommunicationPolicy>::type * = 0); + SPolicy, senf::ConnectedCommunicationPolicy>::type * = 0); }; \endcode