MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ScheduleSend

Method ScheduleSend

libi2pd/Streaming.cpp:1598–1609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1596 }
1597
1598 void Stream::ScheduleSend ()
1599 {
1600 if (m_Status != eStreamStatusTerminated)
1601 {
1602 m_SendTimer.cancel ();
1603 uint64_t interval = SEND_INTERVAL + m_LocalDestination.GetRandom () % SEND_INTERVAL_VARIANCE;
1604 if (interval < m_PacingTime) interval = m_PacingTime;
1605 m_SendTimer.expires_after (std::chrono::microseconds(interval));
1606 m_SendTimer.async_wait (std::bind (&Stream::HandleSendTimer,
1607 shared_from_this (), std::placeholders::_1));
1608 }
1609 }
1610
1611 void Stream::HandleSendTimer (const boost::system::error_code& ecode)
1612 {

Callers

nothing calls this directly

Calls 1

GetRandomMethod · 0.80

Tested by

no test coverage detected