more logging
This commit is contained in:
parent
59aa384ec6
commit
f0660ca220
|
@ -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})\n`);
|
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes.toString('hex').match(/../g).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);
|
||||||
|
|
|
@ -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})\n`);
|
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes.toString('hex').match(/../g).join(' ')})\n`);
|
||||||
const termBytes = process.stdin.read(termLen);
|
const termBytes = process.stdin.read(termLen);
|
||||||
|
|
||||||
if (termBytes) {
|
if (termBytes) {
|
||||||
|
|
Loading…
Reference in New Issue