2021-11-04 01:19:52 +01:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [writePort](./bitburner.ns.writeport.md)
|
|
|
|
|
|
|
|
## NS.writePort() method
|
|
|
|
|
|
|
|
Write data to a port.
|
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2021-11-12 21:42:57 +01:00
|
|
|
writePort(port: number, data: string | number): Promise<any>;
|
2021-11-04 01:19:52 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| port | number | |
|
2021-11-12 21:42:57 +01:00
|
|
|
| data | string \| number | |
|
2021-11-04 01:19:52 +01:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
|
|
|
Promise<any>
|
|
|
|
|
|
|
|
The data popped off the queue if it was full.
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
RAM cost: 0 GB
|
|
|
|
|
|
|
|
Write data to that netscript port.
|
|
|
|
|