logging
This commit is contained in:
parent
35c2763c31
commit
f2baff2816
|
@ -17,7 +17,7 @@ export class Port extends Duplex {
|
|||
const lenBytes = process.stdin.read(4);
|
||||
if (lenBytes) {
|
||||
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);
|
||||
if (termBytes) {
|
||||
const decoded = this.bert.decode(termBytes);
|
||||
|
|
|
@ -22,7 +22,7 @@ export class Port extends Duplex {
|
|||
const lenBytes = process.stdin.read(4);
|
||||
if (lenBytes) {
|
||||
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);
|
||||
|
||||
if (termBytes) {
|
||||
|
|
Loading…
Reference in New Issue