--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief ActiveFeeder non-inline non-template implementation */
+
+#include "ActiveFeeder.hh"
+//#include "ActiveFeeder.ih"
+
+// Custom includes
+
+//#include "ActiveFeeder.mpp"
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////
+// senf::ppi::module::ActiveFeeder
+
+////////////////////////////////////////
+// private members
+
+prefix_ void senf::ppi::module::ActiveFeeder::request()
+{
+ output(input());
+}
+
+///////////////////////////////cc.e////////////////////////////////////////
+#undef prefix_
+//#include "ActiveFeeder.mpp"
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief ActiveFeeder inline non-template implementation */
+
+// Custom includes
+
+#define prefix_ inline
+///////////////////////////////cci.p///////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////
+// senf::ppi::module::ActiveFeeder
+
+prefix_ senf::ppi::module::ActiveFeeder::ActiveFeeder()
+{
+ route(input,idle_);
+ route(idle_,output);
+ registerEvent(& ActiveFeeder::request, idle_);
+}
+
+///////////////////////////////cci.e///////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief ActiveFeeder public header */
+
+#ifndef HH_ActiveFeeder_
+#define HH_ActiveFeeder_ 1
+
+// Custom includes
+#include "Module.hh"
+#include "Connectors.hh"
+#include "IdleEvent.hh"
+
+//#include "ActiveFeeder.mpp"
+///////////////////////////////hh.p////////////////////////////////////////
+
+namespace senf {
+namespace ppi {
+namespace module {
+
+ class ActiveFeeder
+ : public Module
+ {
+ SENF_PPI_MODULE(ActiveFeeder);
+ public:
+ connector::ActiveInput input;
+ connector::ActiveOutput output;
+
+ ActiveFeeder();
+
+ private:
+ void request();
+
+ IdleEvent idle_;
+ };
+
+}}}
+
+///////////////////////////////hh.e////////////////////////////////////////
+#include "ActiveFeeder.cci"
+//#include "ActiveFeeder.ct"
+//#include "ActiveFeeder.cti"
+#endif
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief ActiveFeeder.test unit tests */
+
+//#include "ActiveFeeder.test.hh"
+//#include "ActiveFeeder.test.ih"
+
+// Custom includes
+#include "ActiveFeeder.hh"
+#include "DebugModules.hh"
+#include "Setup.hh"
+
+#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/test_tools.hpp>
+
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
+
+namespace debug = senf::ppi::module::debug;
+namespace ppi = senf::ppi;
+namespace module = senf::ppi::module;
+
+BOOST_AUTO_UNIT_TEST(activeFeeder)
+{
+ debug::PassivePacketSource source;
+ debug::PassivePacketSink sink;
+ module::ActiveFeeder feeder;
+
+ ppi::connect(source,feeder);
+ ppi::connect(feeder,sink);
+
+ source.submit(senf::DataPacket::create());
+ source.submit(senf::DataPacket::create());
+ source.submit(senf::DataPacket::create());
+
+ ppi::run();
+
+ BOOST_CHECK_EQUAL( source.size(), 0u );
+ BOOST_CHECK_EQUAL( sink.size(), 3u );
+}
+
+///////////////////////////////cc.e////////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
\param[in] handler Handler to call on throttle
notifications. */
- void onThrottle();
+ void onThrottle(); ///< Clear throttle notification handler
template <class Handler>
void onUnthrottle(Handler handler); ///< Register unthrottle notification handler
\param[in] handle Handler to call on unthrottle
notifications. */
- void onUnthrottle();
+ void onUnthrottle(); ///< Clear unthrottle notification handler
- bool throttled() const;
+ bool throttled() const; ///< \c true, if peer() is throttled
PassiveConnector & peer() const;
ActiveOutput & peer() const;
- bool boolean_test() const;
+ bool boolean_test() const; ///< \c true, if ! empty()
template <class QDisc>
void qdisc(QDisc const & disc); ///< Change the queueing discipline
public:
ActiveInput & peer() const;
- bool boolean_test() const;
+ bool boolean_test() const; ///< Always \c true
- void connect(ActiveInput & target);
+ void connect(ActiveInput & target); ///< Internal: Use senf::ppi::connect() instead
friend class ActiveInput;
};
public:
PassiveOutput & peer() const;
- bool boolean_test() const;
+ bool boolean_test() const; ///< \c true, if ! empty() or ! throttled()
void request(); ///< request more packets without dequeuing any packet
public:
PassiveInput & peer() const;
- bool boolean_test() const;
+ bool boolean_test() const; ///< \c true if peer() is ! throttled()
- void connect(PassiveInput & target);
+ void connect(PassiveInput & target); ///< Internal: Use senf::ppi::connect() instead
};
///@}
//#include "DebugModules.mpp"
///////////////////////////////hh.p////////////////////////////////////////
+/** \namespace senf::ppi::module::debug
+ \brief Debug modules
+
+ This namespace collects several modules helpful for PPI debugging. The modules allow to manually
+ pass packets into a network and read back the output packets.
+
+
+ */
+
namespace senf {
namespace ppi {
namespace module {
namespace debug {
+ /** \brief
+ */
class ActivePacketSource
: public Module,
public SafeBool<ActivePacketSource>
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
+namespace debug = senf::ppi::module::debug;
+namespace ppi = senf::ppi;
+
BOOST_AUTO_UNIT_TEST(debugModules)
{
- namespace debug = senf::ppi::module::debug;
- namespace ppi = senf::ppi;
-
{
debug::ActivePacketSource source;
debug::PassivePacketSink sink;
detail::EventBinding<EventType> & binding();
};
+#ifndef DOXYGEN
+
template <class Self>
class EventImplementationHelper<void,Self>
{
detail::EventBinding<void> & binding();
};
+#endif
+
template <class EventType>
class EventImplementation
: public EventDescriptor,
typedef EventType const & type;
};
+#ifndef DOXYGEN
+
template <>
struct EventArgType<void>
{
typedef void type;
};
+#endif
+
}}}
///////////////////////////////ih.e////////////////////////////////////////
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief IdleEvent non-inline non-template implementation */
+
+#include "IdleEvent.hh"
+//#include "IdleEvent.ih"
+
+// Custom includes
+#include "Scheduler/Scheduler.hh"
+
+//#include "IdleEvent.mpp"
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////
+// senf::ppi::IdleEvent
+
+////////////////////////////////////////
+// private members
+
+prefix_ void senf::ppi::IdleEvent::v_enable()
+{
+ id_ = Scheduler::instance().timeout(manager().now(), boost::bind(&IdleEvent::cb,this));
+}
+
+prefix_ void senf::ppi::IdleEvent::v_disable()
+{
+ Scheduler::instance().cancelTimeout(id_);
+ id_ = 0;
+}
+
+prefix_ void senf::ppi::IdleEvent::cb()
+{
+ callback();
+ if (enabled())
+ v_enable();
+}
+
+///////////////////////////////cc.e////////////////////////////////////////
+#undef prefix_
+//#include "IdleEvent.mpp"
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief IdleEvent inline non-template implementation */
+
+// Custom includes
+
+#define prefix_ inline
+///////////////////////////////cci.p///////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////
+// senf::ppi::IdleEvent
+
+prefix_ senf::ppi::IdleEvent::IdleEvent()
+ : id_(0)
+{}
+
+///////////////////////////////cci.e///////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief IdleEvent public header */
+
+#ifndef HH_IdleEvent_
+#define HH_IdleEvent_ 1
+
+// Custom includes
+#include "Events.hh"
+
+//#include "IdleEvent.mpp"
+///////////////////////////////hh.p////////////////////////////////////////
+
+namespace senf {
+namespace ppi {
+
+ class IdleEvent
+ : public EventImplementation<>
+ {
+ public:
+ IdleEvent();
+
+ protected:
+
+ private:
+ virtual void v_enable();
+ virtual void v_disable();
+
+ void cb();
+
+ unsigned id_;
+ };
+
+}}
+
+
+///////////////////////////////hh.e////////////////////////////////////////
+#include "IdleEvent.cci"
+//#include "IdleEvent.ct"
+//#include "IdleEvent.cti"
+#endif
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
prefix_ void senf::ppi::IntervalTimer::v_disable()
{
Scheduler::instance().cancelTimeout(id_);
+ id_ = 0;
}
prefix_ void senf::ppi::IntervalTimer::schedule()
prefix_ void senf::ppi::IntervalTimer::cb()
{
callback(info_, info_.expected);
+ if (! enabled())
+ return;
++ info_.number;
if (info_.number >= eventsPerInterval_) {
info_.number = 0;
{
public:
///////////////////////////////////////////////////////////////////////////
- // Types
-
- ///////////////////////////////////////////////////////////////////////////
///\name Structors and default members
///@{
///////////////////////////////////////////////////////////////////////////
// namespace members
+#ifndef DOXYGEN
+
template <class Source>
prefix_ senf::ppi::connector::PassiveInput & senf::ppi::connect(Source & source,
module::PassiveJoin & target)
return target.connect(source);
}
+#endif
+
///////////////////////////////cti.e///////////////////////////////////////
#undef prefix_
namespace senf {
namespace ppi {
+#ifndef DOXYGEN
+
template <class Source>
connector::PassiveInput & connect(Source & source, module::PassiveJoin & target);
template <class Source>
connector::ActiveInput & connect(Source & source, module::PriorityJoin & target);
+#endif
+
namespace module {
class PassiveJoin
ClockService::clock_type now() const;
- void destroy();
-
#ifndef DOXYGEN
virtual void macro_SENF_PPI_MODULE_missing() = 0;
#endif
private:
virtual void init();
+#ifndef DOXYGEN
+ public:
+#endif
+ void destroy();
+
+ private:
EventManager & eventManager() const;
ModuleManager & moduleManager() const;
(*i)->init();
}
+struct senf::ppi::ModuleManager::RunGuard
+{
+ RunGuard(ModuleManager & m) : manager(m) { manager.running_ = true; }
+ ~RunGuard() { manager.running_ = false; }
+ ModuleManager & manager;
+};
+
prefix_ void senf::ppi::ModuleManager::run()
{
init();
+ RunGuard guard (*this);
Scheduler::instance().process();
}
+////////////////////////////////////////
+// private members
+
+prefix_ senf::ppi::ModuleManager::ModuleManager()
+ : running_(false), terminate_(false)
+{}
+
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
//#include "ModuleManager.mpp"
moduleRegistry_.end());
}
+prefix_ bool senf::ppi::ModuleManager::running()
+ const
+{
+ return running_;
+}
+
///////////////////////////////cci.e///////////////////////////////////////
#undef prefix_
void init();
void run();
- protected:
+ bool running() const;
private:
+ ModuleManager();
+
typedef std::vector<module::Module *> ModuleRegistry;
+ struct RunGuard;
+ friend class RunGuard;
+
ModuleRegistry moduleRegistry_;
+ bool running_;
+ bool terminate_;
};
typedef Connector type;
};
+#ifndef DOXYGEN
+
// RoutingTraits specialization for Event types. Events may be both dataSource or dataTarget but
// cannot be notifySource.
template <class Event>
typedef EventDescriptor type;
};
+
+#endif
// The RoutingTraits give routing related information about the argument type:
// - Wether the type is a notifySource or notifyTarget
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
+#ifndef DOXYGEN
+
prefix_ void senf::ppi::connect(connector::ActiveOutput & source,
connector::PassiveInput & target)
{
ModuleManager::instance().init();
}
+#endif
+
///////////////////////////////cci.e///////////////////////////////////////
#undef prefix_
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
+#ifndef DOXYGEN
+
template <class M, class C>
prefix_ void
senf::ppi::connect(M & source, C & target,
connect(source.output, target.input);
}
+#endif
+
///////////////////////////////cti.e///////////////////////////////////////
#undef prefix_
static type make(boost::function<void()> callable, Owner &);
};
+#ifndef DOXYGEN
+
template <>
struct Callback<void>
{
static type make(type callable, Owner &);
};
+#endif
+
}}}
///////////////////////////////hh.e////////////////////////////////////////
Self & self();
};
+#ifndef DOXYGEN
+
template <class Self>
class EventBindingHelper<void,Self>
{
Self & self();
};
+#endif
+
template <class EventType>
class EventBinding
: public EventBindingBase,
// amount the time has been changed. To do this we need an as accurate as possible approximation
// of the expected current time value. We need to differentiate two cases:
//
- // a) Clock skew detected in within now()
+ // a) Clock skew detected within now()
//
- // In this case, we use getitimer() to find the time remaining in the timer. Using this value and
- // an the saved gettimeofday() value we can adjust base_ accordingly.
+ // In this case, we use getitimer() to find the time remaining in the timer. Using this value
+ // and the saved gettimeofday() value we can adjust base_ accordingly.
//
// b) Clock skew detected in the signal handler
//
- // In this case we use the save gettimeofday() value + CheckInterval to adjust base_.
+ // In this case we use the saved gettimeofday() value + CheckInterval to adjust base_.
/** \brief Reliable high precision monotonous clock source
Unsigned integer type representing scheduler time. Scheduler time is measured in
nanoseconds relative to some implementation defined reference time.
*/
- typedef boost::uint_fast64_t clock_type;
+ typedef boost::int_fast64_t clock_type;
/** \brief Absolute time data type
{
terminate_ = false;
eventTime_ = ClockService::now();
- while (! terminate_) {
+ while (! terminate_ && ( ! timerQueue_.empty() || ! fdTable_.empty())) {
while ( ! timerQueue_.empty() && timerQueue_.top()->second.timeout <= eventTime_ ) {
TimerMap::iterator i (timerQueue_.top());
if (! i->second.canceled)
if (terminate_)
return;
- int timeout (MinTimeout);
+ int timeout (-1);
if (! timerQueue_.empty()) {
ClockService::clock_type delta (
(timerQueue_.top()->second.timeout - eventTime_)/1000000UL);
- if (delta<MinTimeout)
- timeout = int(delta);
+ timeout = delta < 0 ? 0 : delta;
}
+ ///\fixme Handle more than one epoll_event per call
struct epoll_event ev;
int events = epoll_wait(epollFd_, &ev, 1, timeout);
if (events<0)
- // 'man epoll' says, epoll will not return with EINTR.
- throw SystemException(errno);
+ // even though 'man epoll' does not mention EINTR the reality is different ...
+ if (errno != EINTR)
+ throw SystemException(errno);
/// \fixme Fix unneeded timer delays
// Hmm ... I remember, I purposely moved the timeout-handlers to the loop top ... but why?
// This delays possible time-critical handlers even further ...
eventTime_ = ClockService::now();
- if (events==0)
+ if (events <= 0)
// Timeout .. the handler will be run when going back to the loop top
continue;
prefix_ unsigned senf::Scheduler::timeout(ClockService::clock_type timeout,
TimerCallback const & cb)
{
+ ++ timerIdCounter_;
TimerMap::iterator i (
timerMap_.insert(std::make_pair(timerIdCounter_,
TimerSpec(timeout,cb,timerIdCounter_))).first);
timerQueue_.push(i);
- return timerIdCounter_++;
+ return timerIdCounter_;
}
prefix_ void senf::Scheduler::cancelTimeout(unsigned id)
variable. The C++ standard then provides above guarantee. The instance will be
initialized the first time, the code flow passes the variable declaration found in
the instance() body.
+
+ \fixme TimerQueue as \c map \e and \c priority_queue doesn't make sense ...
*/
static Scheduler & instance();
private:
typedef boost::function<void (EventId)> SimpleCallback;
- static unsigned const MinTimeout = 1000;
-
Scheduler();
void do_add(int fd, SimpleCallback const & cb, int eventMask = EV_ALL);