Function: performSinglePingCheck()
performSinglePingCheck(
host
:string
,timeout
:number
):Promise
<MonitorCheckResult
>
Defined in: electron/services/monitoring/utils/pingRetry.ts:75
Performs a single ping connectivity check without retry logic.
Parameters
host
string
Target hostname or IP address to ping.
timeout
number
Maximum time to wait for the ping response in milliseconds.
Returns
A promise that resolves to a MonitorCheckResult with ping status and timing.
Remarks
This function performs a single ping attempt to the specified host using the node-ping library. It measures response time and returns a structured result. This function is used internally by performPingCheckWithRetry and can also be used directly for single-attempt checks.
Uses only cross-platform ping options: numeric, timeout, and min_reply for maximum compatibility.
Throws
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error if the ping operation fails or times out.