Well, I'll try to explain the situation:
I'm studying NodeJS and for that I decided to rewrite the server-side code of an application that was originally written in C / C ++, and that server receives packets in hexadecimal from the client application, the question is: how to receive those packets (packets) in NodeJS?
I created a socket for the connection, but I put a lock on it, it follows the code:
var port = process.env.PORT || 8281;
var io = require('socket.io')(port);
io.on('connection', function (socket) {
var address = socket.handshake;
console.log('Nova conexão de: ' + JSON.stringify(address, null, 4));
});