(event: VMWriteEvent)
| 1419 | } |
| 1420 | |
| 1421 | public handleStdoutEvent(event: VMWriteEvent): void { |
| 1422 | if (!event.bytes) |
| 1423 | return; |
| 1424 | const buff = Buffer.from(event.bytes, "base64"); |
| 1425 | const message = buff.toString("utf8"); |
| 1426 | // Use the promise from above, to avoid stdout getting out of order with logging events. |
| 1427 | this.lastLoggingEvent = this.lastLoggingEvent.then(() => this.logStdout(message)); |
| 1428 | } |
| 1429 | |
| 1430 | // Logging |
| 1431 | public async processLoggingEvent(event: VMEvent): Promise<void> { |