mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
27 lines
1.1 KiB
Markdown
27 lines
1.1 KiB
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md)
|
||
|
|
||
|
## IPort interface
|
||
|
|
||
|
Interface of a netscript port
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
export interface IPort
|
||
|
```
|
||
|
|
||
|
## Properties
|
||
|
|
||
|
| Property | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| [clear](./bitburner.iport.clear.md) | () => void | removes all data from port |
|
||
|
| [empty](./bitburner.iport.empty.md) | () => boolean | check if port is empty |
|
||
|
| [full](./bitburner.iport.full.md) | () => boolean | check if port is full |
|
||
|
| [peek](./bitburner.iport.peek.md) | () => any | reads first element without removing it from port if no data in port returns "NULL PORT DATA" |
|
||
|
| [read](./bitburner.iport.read.md) | () => any | reads and removes first element from port if no data in port returns "NULL PORT DATA" |
|
||
|
| [tryWrite](./bitburner.iport.trywrite.md) | (value: any) => boolean | add data to port if not full. |
|
||
|
| [write](./bitburner.iport.write.md) | (value: any) => any | write data to the port and removes and returns first element if full |
|
||
|
|