请问怎么将97转成’\x00\x61’以便向socket传输?
charCodeAt
@dlutwuwei 能否具体点?
数字转为字符16进制?感觉有点不对啊,那不是变长了?
console.log("\\x00\\x%s", (97).toString(16))
var x = new Buffer(2); x.writeUInt16BE(97)