#include "host/pingprotocol.h"
#include "dns/resolverbase.h"
-typedef std::list<PingerItem> pinger_list;
+typedef std::vector<PingerItem> pinger_vec;
//-----------------------------------------------------------------------------
// PingScheduler
void update_dns_resolver( PingProtocol current_protocol );
void ping_when_ready();
+ void delayed_ping( const boost::system::error_code &error,
+ const boost::asio::ip::address &ip,
+ const int pinger_index );
void dns_resolve_callback(const bool was_success,
const int recursion_count);
void start_resolving_ping_address();
/// The Dns resolver
ResolverItem Resolver;
/// vector of pingers
- pinger_list Pingers;
+ pinger_vec Pingers;
/// number of pingers that work in parallel
int NPingers;
/// number of results from pingers
int NPingersDone;
/// delay (in ms) between pings to same IP
int ParallelPingDelay;
+ /// timers for delayed pings
+ boost::asio::deadline_timer DelayedPingTimer;
/// a flag whether we should ping as soon as dns is ready
bool WantToPing;
/// Prefix to log messages for quicker analysis/debugging