*
* @param destination The address of the host where to ping.
*
+ * @return true if the ping was successfully performed, or false if the ping
+ * was not replied due timeout.
+ *
* @note This method is synchronous, i.e. this method blocks and returns only
* after the ping requested has finished or timed-out.
*/
-void BoostPinger::ping( const string &destination )
+bool BoostPinger::ping( const string &destination )
{
BOOST_ASSERT( !destination.empty() );
DestinationEndpoint = *Resolver.resolve( query );
start_pinger();
+
+ bool ping_success = (PingerStatus == PingStatus_SuccessReply);
+ return ping_success;
}
void BoostPinger::start_pinger()