This commit is contained in:
Moon Man 2024-01-28 12:35:02 -05:00
parent 35c2763c31
commit f2baff2816
2 changed files with 2 additions and 2 deletions

2
dist/main.js vendored
View File

@ -17,7 +17,7 @@ export class Port extends Duplex {
const lenBytes = process.stdin.read(4); const lenBytes = process.stdin.read(4);
if (lenBytes) { if (lenBytes) {
const termLen = this.bert.bytesToInt(lenBytes, 4, true); const termLen = this.bert.bytesToInt(lenBytes, 4, true);
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes.toString('hex').match(/../g).join(' ')})\n`); process.stderr.write(`Got incoming term length: ${termLen} (bytes: <<${lenBytes.toString('hex').match(/../g).map((hex) => parseInt(`0x${hex}`).toString()).join(', ')}>>)\n`);
const termBytes = process.stdin.read(termLen); const termBytes = process.stdin.read(termLen);
if (termBytes) { if (termBytes) {
const decoded = this.bert.decode(termBytes); const decoded = this.bert.decode(termBytes);

View File

@ -22,7 +22,7 @@ export class Port extends Duplex {
const lenBytes = process.stdin.read(4); const lenBytes = process.stdin.read(4);
if (lenBytes) { if (lenBytes) {
const termLen = this.bert.bytesToInt(lenBytes, 4, true); const termLen = this.bert.bytesToInt(lenBytes, 4, true);
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes.toString('hex').match(/../g).join(' ')})\n`); process.stderr.write(`Got incoming term length: ${termLen} (bytes: <<${lenBytes.toString('hex').match(/../g).map((hex: string) => parseInt(`0x${hex}`).toString()).join(', ')}>>)\n`);
const termBytes = process.stdin.read(termLen); const termBytes = process.stdin.read(termLen);
if (termBytes) { if (termBytes) {