High-performance ping session for simultaneous multi-target pinging. Uses a single persistent raw ICMP socket.
Constructor
Methods
collect():Array<{seq:Int, rtt:Float, host:String}>
Non-blockingly collects all available ping replies.
Returns:
Array of objects containing host, rtt (ms), and sequence number.
send(host:String):Int
Sends a non-blocking ICMP echo request to a host.
Parameters:
host | The hostname or IP to ping. |
|---|
Returns:
The sequence number assigned to this request, or -1 on error.