Callback function for ping results. This function is called for every echo packet sent. If the deadline is exceeded, it is not called for the remaining packets. If the echo response has been received, the error value will be null, otherwise it contains the error.
Signature
JavaScript
(err, data) => void
Parameters
Parameter
Type
Description
err
Error | null
Error object if an error occurred, otherwise null.
data
PingDetail
Data about the ping attempt, including timing and echo details.