more logging
This commit is contained in:
parent
c8cba3c45e
commit
59aa384ec6
|
@ -335,7 +335,7 @@ export class Bert {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
decode_string = (buffer) => {
|
decode_string = (buffer) => {
|
||||||
const sizeLen = this.convention == Lang.ELIXIR ? 4 : 2;
|
const sizeLen = this.convention === Lang.ELIXIR ? 4 : 2;
|
||||||
const size = this.bytesToInt(buffer, sizeLen, true);
|
const size = this.bytesToInt(buffer, sizeLen, true);
|
||||||
buffer = buffer.subarray(sizeLen);
|
buffer = buffer.subarray(sizeLen);
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -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}\n`);
|
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes})\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);
|
||||||
|
|
|
@ -391,7 +391,7 @@ export class Bert {
|
||||||
};
|
};
|
||||||
|
|
||||||
decode_string = (buffer: Buffer) => {
|
decode_string = (buffer: Buffer) => {
|
||||||
const sizeLen = this.convention == Lang.ELIXIR ? 4 : 2;
|
const sizeLen = this.convention === Lang.ELIXIR ? 4 : 2;
|
||||||
const size = this.bytesToInt(buffer, sizeLen, true);
|
const size = this.bytesToInt(buffer, sizeLen, true);
|
||||||
buffer = buffer.subarray(sizeLen);
|
buffer = buffer.subarray(sizeLen);
|
||||||
|
|
||||||
|
|
|
@ -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}\n`);
|
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes})\n`);
|
||||||
const termBytes = process.stdin.read(termLen);
|
const termBytes = process.stdin.read(termLen);
|
||||||
|
|
||||||
if (termBytes) {
|
if (termBytes) {
|
||||||
|
|
Loading…
Reference in New Issue