2022-10-21 17:16:00 +02:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NetscriptPort](./bitburner.netscriptport.md) > [write](./bitburner.netscriptport.write.md)
|
|
|
|
|
|
|
|
## NetscriptPort.write() method
|
|
|
|
|
|
|
|
Write data to a port.
|
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2022-11-20 18:07:22 +01:00
|
|
|
write(value: string | number): PortData | null;
|
2022-10-21 17:16:00 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| value | string \| number | |
|
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
2022-11-20 18:07:22 +01:00
|
|
|
[PortData](./bitburner.portdata.md) \| null
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
The data popped off the queue if it was full.
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
RAM cost: 0 GB
|
|
|
|
|