bitburner-src/markdown/bitburner.iport.md
2022-01-16 16:11:52 +00:00

1.1 KiB

Home > bitburner > IPort

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