Skip to content

isTcpPortOpen

isTcpPortOpen(port, host?): Promise<boolean>

Defined in: net/is-tcp-port-open.ts:11

Test if a TCP port is open on a given host.

number

The TCP port to test.

string

The host to test the port on. Defaults to localhost.

Promise<boolean>

A promise that resolves to true if the port is open, or false if it is closed or unreachable.