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
// Custom includes
#include "SocketSink.hh"
+#include "../Socket/ClientSocketHandle.hh"
#define prefix_ inline
///////////////////////////////cci.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_
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_
\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