41 prefix_ void senf::emu::PacketDelayer::init()
73 prefix_ void senf::emu::PacketDelayer::enableDelay(
bool flag)
77 rndEngine_.reset(
new std::mt19937(std::random_device()()));
78 rndDist_.reset(
new std::uniform_int_distribution<ClockService::int64_type>(
87 prefix_ void senf::emu::PacketDelayer::onRequest_delay()
91 timer_.
timeout( queue_.front());
94 prefix_ void senf::emu::PacketDelayer::timeout()
100 if (! queue_.empty())
101 timer_.
timeout( queue_.front());
104 prefix_ void senf::emu::PacketDelayer::throttleNotification()
109 prefix_ void senf::emu::PacketDelayer::unthrottleNotification()
config::time_type clock_type
Route< connector::InputConnector, connector::OutputConnector > & route(connector::InputConnector &input, connector::OutputConnector &output)
void onThrottle(Handler handler)
PacketDelayer public header.
static SENF_CLOCKSERVICE_CONSTEXPR clock_type seconds(int64_type const &v)
boost::function< R(Args)> membind(R(T::*fn)(Args), T *ob)
ppi::connector::PassiveInput input
static SENF_CLOCKSERVICE_CONSTEXPR int64_type in_nanoseconds(clock_type const &v)
void onUnthrottle(Handler handler)
void timeout(ClockService::clock_type const &timeout, bool initiallyEnabled=true)
ClockService::clock_type variation() const
void onRequest(Handler handler)
ClockService::clock_type delay() const
void write(PacketType const &packet)
ppi::connector::ActiveOutput output
void throttlingDisc(ThrottlingDisc const &disc)
static SENF_CLOCKSERVICE_CONSTEXPR clock_type nanoseconds(int64_type const &v)