bitburner-src/markdown/bitburner.ns.getporthandle.md

725 B

Home > bitburner > NS > getPortHandle

NS.getPortHandle() method

Get all data on a port.

Signature:

getPortHandle(portNumber: number): NetscriptPort;

Parameters

Parameter Type Description
portNumber number Port number. Must be a positive integer.

Returns:

NetscriptPort

Remarks

RAM cost: 0 GB

Get a handle to a Netscript Port.

WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.