From: g0dil Date: Thu, 31 Jan 2008 08:34:19 +0000 (+0000) Subject: Merged revisions 623,625-627,630-652 via svnmerge from X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=e7ac3fef18af5ec0076f02290ad439a9d6e05491;p=senf.git Merged revisions 623,625-627,630-652 via svnmerge from 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 --- diff --git a/PPI/SocketSink.cci b/PPI/SocketSink.cci index 5acdcac..08cc569 100644 --- a/PPI/SocketSink.cci +++ b/PPI/SocketSink.cci @@ -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 - -template -prefix_ void senf::ppi::module::PassiveSocketSink::replaceHandle(Handle handle) -{ - handle_ = handle; -} - ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_ diff --git a/PPI/SocketSink.cti b/PPI/SocketSink.cti index 0c24c9f..24b33dd 100644 --- a/PPI/SocketSink.cti +++ b/PPI/SocketSink.cti @@ -48,6 +48,17 @@ prefix_ Writer & senf::ppi::module::PassiveSocketSink::writer() return writer_; } +template +prefix_ typename Writer::Handle & senf::ppi::module::PassiveSocketSink::handle() +{ + return handle_; +} + +template +prefix_ void senf::ppi::module::PassiveSocketSink::replaceHandle(Handle handle) +{ + handle_ = handle; +} ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_ diff --git a/PPI/SocketSink.hh b/PPI/SocketSink.hh index 96e3360..5e63b99 100644 --- a/PPI/SocketSink.hh +++ b/PPI/SocketSink.hh @@ -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