mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
PORTS: Add ns.nextPortWrite() as a safer option (#1036)
This commit is contained in:
11
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
11
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -6644,6 +6644,17 @@ export interface NS {
|
||||
*/
|
||||
tryWritePort(portNumber: number, data: string | number): boolean;
|
||||
|
||||
/**
|
||||
* Listen for a port write.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
* Sleeps until the port is written to.
|
||||
*
|
||||
* @param port - Port to listen for a write on. Must be a positive integer.
|
||||
*/
|
||||
nextPortWrite(port: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Read content of a file.
|
||||
* @remarks
|
||||
|
||||
Reference in New Issue
Block a user