MCPcopy Create free account
hub / github.com/Marus/cortex-debug / onData

Method onData

src/frontend/rtt_terminal.ts:72–86  ·  view source on GitHub ↗
(data: Buffer)

Source from the content-addressed store, hash-verified

70 }
71
72 private onData(data: Buffer) {
73 try {
74 if (this.logFd >= 0) {
75 fs.writeSync(this.logFd, data);
76 }
77 if (this.options.type === 'binary') {
78 this.binaryFormatter.writeBinary(data);
79 } else {
80 this.writeNonBinary(data);
81 }
82 }
83 catch (e) {
84 magentaWrite(`Error writing data: ${e}\n`, this.ptyTerm);
85 }
86 }
87
88 private openLogFile() {
89 this.logFd = -1;

Callers 1

connectToSourceMethod · 0.95

Calls 3

writeNonBinaryMethod · 0.95
magentaWriteFunction · 0.90
writeBinaryMethod · 0.80

Tested by

no test coverage detected