Project

General

Profile

Added in 1.9.0

$portfree(N,[ipaddress])

Returns $true if the specified port number is not in use, otherwise $false.

Parameters

N - The port number to check.
[ipaddress] - If specified, only the interface with that IP address is checked for used ports, otherwise all active interfaces are checked. An adapter name can also be used instead of an IP address.

Example

; Check if port 4242 is free.
//echo -ag Port 4242 is $iif($portfree(4242), open, not open)

Also available in: PDF HTML TXT