bitburner-src/markdown/bitburner.ns.writeport.md
omuretsu 06a985bdf8 Revert "Remove markdown from git tracking (#139)"
This reverts commit bbb6e3f309935aebac74ddb1fbeec12dfb7540b1.
2022-10-21 11:16:00 -04:00

34 lines
679 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [writePort](./bitburner.ns.writeport.md)
## NS.writePort() method
Write data to a port.
<b>Signature:</b>
```typescript
writePort(port: number, data: string | number): Promise<PortData>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| port | number | |
| data | string \| number | |
<b>Returns:</b>
Promise&lt;[PortData](./bitburner.portdata.md)<!-- -->&gt;
The data popped off the queue if it was full.
## Remarks
RAM cost: 0 GB
Write data to that netscript port.