bitburner-src/markdown/bitburner.iport.md

27 lines
1.1 KiB
Markdown
Raw Normal View History

2022-01-13 19:48:54 +01:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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) | () =&gt; void | removes all data from port |
| [empty](./bitburner.iport.empty.md) | () =&gt; boolean | check if port is empty |
| [full](./bitburner.iport.full.md) | () =&gt; boolean | check if port is full |
| [peek](./bitburner.iport.peek.md) | () =&gt; any | reads first element without removing it from port if no data in port returns "NULL PORT DATA" |
| [read](./bitburner.iport.read.md) | () =&gt; any | reads and removes first element from port if no data in port returns "NULL PORT DATA" |
| [tryWrite](./bitburner.iport.trywrite.md) | (value: any) =&gt; boolean | add data to port if not full. |
| [write](./bitburner.iport.write.md) | (value: any) =&gt; any | write data to the port and removes and returns first element if full |