Skip to content
Snippets Groups Projects
Commit 6b757f16 authored by g0dil's avatar g0dil
Browse files

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
........
parent b590d403
No related branches found
No related tags found
No related merge requests found
......@@ -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_
......
......@@ -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_
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment