(port: number)
| 106 | // has forwarded this port to the remote machine where the Dart extension is running. Netcat is used to access the local devices, |
| 107 | // instead of starting another daemon process on the remote machine. |
| 108 | protected createNcProcess(port: number) { |
| 109 | this.process = child_process.spawn("nc", ["localhost", port.toString()]) satisfies SpawnedProcess; |
| 110 | |
| 111 | this.process.stdout.on("data", (data: Buffer | string) => this.handleStdOut(data)); |
| 112 | this.process.stderr.on("data", (data: Buffer | string) => this.handleStdErr(data)); |
| 113 | this.process.on("exit", (code, signal) => this.handleExit(code, signal)); |
| 114 | this.process.on("error", (error) => { |
| 115 | void vs.window.showErrorMessage(`Remote daemon startup had an error: ${error}. Check the instructions for using dart.daemonPort`); |
| 116 | this.handleError(error); |
| 117 | }); |
| 118 | } |
| 119 | |
| 120 | protected handleExit(code: number | null, signal: NodeJS.Signals | null) { |
| 121 | if (code && !this.isShuttingDown) |
no test coverage detected