Merged revisions 623,625-627,630-652 via svnmerge from
g0dil [Thu, 31 Jan 2008 08:34:19 +0000 (08:34 +0000)]
https://svn.berlios.de/svnroot/repos/senf/branches/2008-01-TW

........
  r647 | dw6 | 2008-01-30 15:53:54 +0100 (Wed, 30 Jan 2008) | 1 line

  adding access to handle to reconnect sockets
........
  r649 | dw6 | 2008-01-30 17:30:03 +0100 (Wed, 30 Jan 2008) | 1 line

  moving template implementation into cti
........

git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@653 270642c3-0616-0410-b53a-bc976706d245

PPI/SocketSink.cci
PPI/SocketSink.cti
PPI/SocketSink.hh

index 5acdcac..08cc569 100644 (file)
@@ -25,6 +25,7 @@
 
 // Custom includes
 #include "SocketSink.hh"
+#include "../Socket/ClientSocketHandle.hh"
 
 #define prefix_ inline
 ///////////////////////////////cci.p///////////////////////////////////////
@@ -37,15 +38,6 @@ prefix_ void senf::ppi::ConnectedDgramWriter::operator()(Handle handle, Packet p
     handle.write(packet.data());
 }
 
-///////////////////////////////////////////////////////////////////////////
-// senf::ppi::module::PassiveSocketSink<Writer>
-
-template <class Writer>
-prefix_ void senf::ppi::module::PassiveSocketSink<Writer>::replaceHandle(Handle handle)
-{
-    handle_ = handle;
-}
-
 ///////////////////////////////cci.e///////////////////////////////////////
 #undef prefix_
 
index 0c24c9f..24b33dd 100644 (file)
@@ -48,6 +48,17 @@ prefix_ Writer & senf::ppi::module::PassiveSocketSink<Writer>::writer()
     return writer_;
 }
 
+template <class Writer>
+prefix_ typename Writer::Handle & senf::ppi::module::PassiveSocketSink<Writer>::handle()
+{
+    return handle_;
+}
+
+template <class Writer>
+prefix_ void senf::ppi::module::PassiveSocketSink<Writer>::replaceHandle(Handle handle)
+{
+    handle_ = handle;
+}
 ///////////////////////////////cti.e///////////////////////////////////////
 #undef prefix_
 
index 96e3360..5e63b99 100644 (file)
@@ -179,6 +179,11 @@ namespace module {
                                              \param[in] handle Handle to write data to */
 
         Writer & writer();                  ///< Access the Writer
+        Handle & handle();                                     /**< Access the handle. This is intendet to be mainly used to reconnect the under
+                                                                                       lying socket. */
+       /* void reconnect(senf::SocketAddress newAddress);
+                                                                       ///< Reconnect the handle to which the packets are written
+       */
         void replaceHandle(Handle newHandle);
                                         /**< Replace the handle to which the packets are written
                                          * Normally you should access the handle and call connect with