X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FSocketSource.ct;h=e2256615beb51967c7cecad0a5ef87463ae1d4c6;hb=b89e3166f7680755683dccee5e48cb3a820185c0;hp=2d9e881c44ac55d0a9d320131317a5940aaf41e0;hpb=66293acca094b2f29e26e70208691db4af274efb;p=senf.git diff --git a/PPI/SocketSource.ct b/PPI/SocketSource.ct index 2d9e881..e225661 100644 --- a/PPI/SocketSource.ct +++ b/PPI/SocketSource.ct @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -45,9 +45,23 @@ prefix_ Packet senf::ppi::DgramReader::operator()(Handle handle) // senf::ppi::module::ActiveSocketSource template -prefix_ senf::ppi::module::ActiveSocketSource:: -ActiveSocketSource(Handle handle) - : handle_(handle), event_(handle_, IOEvent::Read), reader_() +prefix_ senf::ppi::module::ActiveSocketSource::ActiveSocketSource() +{ + registerEvent( event_, &ActiveSocketSource::read ); + route(event_, output); +} + +template +prefix_ senf::ppi::module::ActiveSocketSource::ActiveSocketSource(Reader reader) + : reader_(reader) +{ + registerEvent( event_, &ActiveSocketSource::read ); + route(event_, output); +} + +template +prefix_ senf::ppi::module::ActiveSocketSource::ActiveSocketSource(Handle handle) + : handle_(handle), event_(handle_, IOEvent::Read) { registerEvent( event_, &ActiveSocketSource::read ); route(event_, output);