BoostPinger::BoostPinger(
boost::asio::io_service &io_service
) :
- io_service( io_service ),
+ IoService( io_service ),
Resolver( io_service ),
DestinationEndpoint(),
Socket( io_service, icmp::v4() ),
{
}
+/*
+ * TODO document that this method blocks (is synchronous)
+ */
void BoostPinger::ping(
const string &destination,
const uint times_to_ping
start_send();
start_receive();
- io_service.run();
+ IoService.run();
}
void BoostPinger::stop_pinger()
{
- io_service.stop();
+ IoService.stop();
}
void BoostPinger::start_send()
uint16_t get_identifier() const;
private:
- boost::asio::io_service &io_service;
+ boost::asio::io_service &IoService;
boost::asio::ip::icmp::resolver Resolver;
boost::asio::ip::icmp::endpoint DestinationEndpoint;
boost::asio::ip::icmp::socket Socket;