How to specify number of packets to ping?

681 Views Asked by At

I'm using POE::Component::Client::Ping to ping multiple hosts with this example.

As I understand this sends one request to host. Is it possible to specify number of packets to ping like in ping -c 4 HOST?

2

There are 2 best solutions below

5
mbsingh On

Yes, it is possible to send a ping with a non-standard payload size. Details here :

https://metacpan.org/pod/POE::Component::Client::Ping#OTHER-RESOURCES

0
Rocco Caputo On

No, POE::Component::Client::Ping doesn't implement repetition logic. It just pings. I wrote it such that control of how it pings is almost entirely in your hands.