ferrum-db-client
Advanced tools
Comparing version 0.2.10 to 0.2.11
@@ -9,3 +9,2 @@ /// <reference types="node" /> | ||
protected pending: Map<number, (buffer: Buffer) => void>; | ||
private lengthBuffer; | ||
private heartBeatPending; | ||
@@ -12,0 +11,0 @@ disposed: boolean; |
@@ -23,3 +23,2 @@ "use strict"; | ||
this.port = socket.remotePort; | ||
this.lengthBuffer = Buffer.alloc(4); | ||
this.socket = socket; | ||
@@ -149,6 +148,7 @@ this.pending = new Map(); | ||
sendMsg(bw) { | ||
this.lengthBuffer.writeInt32LE(bw.position); | ||
this.socket.write(this.lengthBuffer); | ||
const lengthBuffer = Buffer.alloc(4); | ||
lengthBuffer.writeInt32LE(bw.position); | ||
this.socket.write(lengthBuffer); | ||
//@ts-ignore | ||
this.socket.write(bw._buffer.slice(0, bw.position)); | ||
this.socket.write(Buffer.from(bw._buffer.slice(0, bw.position))); | ||
} | ||
@@ -155,0 +155,0 @@ getResponse(myId) { |
{ | ||
"name": "ferrum-db-client", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts", |
@@ -11,3 +11,2 @@ import { BinaryWriter, Encoding } from 'csharp-binary-stream'; | ||
protected pending: Map<number, (buffer: Buffer) => void>; | ||
private lengthBuffer: Buffer; | ||
private heartBeatPending: boolean = false; | ||
@@ -33,3 +32,2 @@ public disposed: boolean; | ||
this.port = socket.remotePort; | ||
this.lengthBuffer = Buffer.alloc(4); | ||
this.socket = socket; | ||
@@ -175,6 +173,7 @@ this.pending = new Map(); | ||
public sendMsg(bw: BinaryWriter): void { | ||
this.lengthBuffer.writeInt32LE(bw.position); | ||
this.socket.write(this.lengthBuffer); | ||
const lengthBuffer = Buffer.alloc(4); | ||
lengthBuffer.writeInt32LE(bw.position); | ||
this.socket.write(lengthBuffer); | ||
//@ts-ignore | ||
this.socket.write(bw._buffer.slice(0, bw.position)); | ||
this.socket.write(Buffer.from(bw._buffer.slice(0, bw.position))); | ||
} | ||
@@ -181,0 +180,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
305549
3523