Commit 502c7dc0 authored by nanahira's avatar nanahira

js

parent 553b983a
......@@ -130,7 +130,7 @@
throw "unknown proto";
}
}
header = new Buffer(3);
header = Buffer.allocUnsafe(3);
header.writeUInt16LE(buffer.length + 1, 0);
header.writeUInt8(proto, 2);
socket.write(header);
......@@ -167,7 +167,7 @@
throw "unknown proto";
}
}
header = new Buffer(3);
header = Buffer.allocUnsafe(3);
header.writeUInt16LE(buffer.length + 1, 0);
header.writeUInt8(proto, 2);
socket.write(header);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment