[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) ## IPort interface Interface of a netscript port Signature: ```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 |