bitburner-src/markdown/bitburner.ns.getporthandle.md
T.J. Eckman 33f0150d25
BUGFIX: Memory Leak in NetscriptPorts (#399)
Co-authored-by: Snarling <84951833+Snarling@users.noreply.github.com>
2023-02-27 19:54:04 -05:00

33 lines
734 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [getPortHandle](./bitburner.ns.getporthandle.md)
## NS.getPortHandle() method
Get all data on a port.
**Signature:**
```typescript
getPortHandle(portNumber: number): NetscriptPort;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| portNumber | number | Port number. Must be an integer between 1 and 20. |
**Returns:**
[NetscriptPort](./bitburner.netscriptport.md)
## 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.