mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
33 lines
725 B
Markdown
33 lines
725 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [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 a positive integer. |
|
|
|
|
**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.
|
|
|