CRM_Utils_Network
in package
Simple static helpers for network operations
Table of Contents
Methods
- checkService() : bool
- Check whether a TCP service is available on $host and $port.
- waitForServiceStartup() : bool
- Try connecting to a TCP service; if it fails, retry. Repeat until serverStartupTimeOut elapses.
Methods
checkService()
Check whether a TCP service is available on $host and $port.
public
static checkService(string $host, string $port, string $serverConnectionTimeOut) : bool
Parameters
- $host : string
- $port : string
- $serverConnectionTimeOut : string
Return values
boolwaitForServiceStartup()
Try connecting to a TCP service; if it fails, retry. Repeat until serverStartupTimeOut elapses.
public
static waitForServiceStartup(string $host, string $port, int $serverStartupTimeOut[, float $interval = 0.333 ]) : bool
Parameters
- $host : string
- $port : string
- $serverStartupTimeOut : int
-
Seconds.
- $interval : float = 0.333
-
Seconds to wait in between pollings.
Return values
bool —TRUE if service is online