mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
1.1 KiB
1.1 KiB
IPort interface
Interface of a netscript port
Signature:
export interface IPort
Properties
| Property | Type | Description |
|---|---|---|
| clear | () => void | removes all data from port |
| empty | () => boolean | check if port is empty |
| full | () => boolean | check if port is full |
| peek | () => any | reads first element without removing it from port if no data in port returns "NULL PORT DATA" |
| read | () => any | reads and removes first element from port if no data in port returns "NULL PORT DATA" |
| tryWrite | (value: any) => boolean | add data to port if not full. |
| write | (value: any) => any | write data to the port and removes and returns first element if full |