Packets: Add PacketRegistry::begin()/end() and senf::dumpPacketRegistries() utility
[senf.git] / Socket / SocketProtocol.hh
index dc9da51..72ddad5 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
 // 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 <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 
 /** \file
     \brief SocketProtocol and ConcreteSocketProtocol public header
-
-    \idea We should optimize the protocol handling. Allocating a protocol instance for every socket
-        body seems quite wasteful. We could derive SocketPolicy from SocketBody (probably privately,
-        since private inheritance models more of 'has a' than 'is a'). This would allow to reduce
-        the number of heap-allocations per socket to one which is good.
  */
 
 // The private inheritance idea should indeed work very well: We just need to change the
@@ -72,9 +67,6 @@
     \see
         \ref handle_group \n
         \ref policy_group
-
-    \todo Complete the protocol interface implementations. Better distribution of members to
-        protocol facets and more precise distribution of functionality among the facets.
  */
 
 /** \defgroup concrete_protocol_group Protocol Implementations (Concrete Protocol Classes)
@@ -182,7 +174,8 @@ namespace senf {
         virtual void close() const;     ///< Close socket
                                         /**< This override will automatically \c shutdown() the
                                              socket whenever it is closed.
-                                             \throws senf::SystemException */
+                                             \throws senf::SystemException 
+                                             \fixme Move into (at least) BSDSOcketProtocol */
         
         virtual void terminate() const; ///< Forcibly close socket
                                         /**< This override will automatically \c shutdown() the
@@ -190,7 +183,8 @@ namespace senf {
                                              disable SO_LINGER to ensure, that v_terminate will not
                                              block. Like the overriden method, this member will ignore
                                              failures and will never throw. It is therefore safe to be
-                                             called from a destructor. */
+                                             called from a destructor. 
+                                             \fixme Move into (at least) BSDSocketProtocol */
 
         virtual void state(SocketStateMap & map, unsigned lod) const;
                                         ///< Return socket state information
@@ -259,8 +253,8 @@ namespace senf {
         friend class SocketBody;
     };
     
-    template <class Policy> class ClientSocketHandle;
-    template <class Policy> class ServerSocketHandle;
+    template <class SPolicy> class ClientSocketHandle;
+    template <class SPolicy> class ServerSocketHandle;
 
     /** \brief Concrete Socket Protocol implementation base class