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

Method sendData

src/frontend/rtt_terminal.ts:165–178  ·  view source on GitHub ↗
(str: string | Buffer)

Source from the content-addressed store, hash-verified

163 }
164
165 public sendData(str: string | Buffer) {
166 if (this.source) {
167 try {
168 if (((typeof str === 'string') || (str instanceof String)) &&
169 (this.options.inputmode === TerminalInputMode.COOKED)) {
170 str = Buffer.from(str as string, this.options.iencoding);
171 }
172 this.source.write(str);
173 }
174 catch (e) {
175 console.error(`RTTTerminal:sendData failed ${e}`);
176 }
177 }
178 }
179
180 private sanitizeEncodings(obj: RTTConsoleDecoderOpts) {
181 obj.encoding = getBinaryEncoding(obj.encoding);

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected