* @return void.
*/
void IcmpPinger::ping(
- const string &destination_ip,
+ const address &destination_ip,
const uint16_t /*destination_port*/, // the ICMP protocol does not use ports
function<void(bool)> ping_done_callback
)
}
-void IcmpPinger::set_destination_endpoint( const string &destination_ip )
+void IcmpPinger::set_destination_endpoint( const address &destination_ip )
{
- BOOST_ASSERT( !destination_ip.empty() );
-
uint16_t port = 0;
- address destination_address = address::from_string( destination_ip );
- DestinationEndpoint = icmp::endpoint( destination_address, port );
+ DestinationEndpoint = icmp::endpoint( destination_ip, port );
}
bool IcmpPinger::start_send()