This has me very confused. I have the following socket server (simplified) in node.js:
net.createServer(function (socket) {
socket.on('data', function (data) {
var replyData = new Buffer('78780E00C425BA53269830303000006C2D0D0A',
'hex').toString('binary');
socket.end(replyData);
});
}).listen(config.port);
What I would expect it to reply to any client is the binary as specified in hexadecimal in the buffer, but it actually replies: 78780E00C38425C2BA5326C298303030006C2D0D0A
This is similar, but not exactly what it should send. What am I missing?
wget http://localhost:9880and looked at the file using a hex editor (Okteta in my case)wgetis a perfectly reasonable way to test this. :)