0
Well, I’ll try to explain the situation:
I am studying Nodejs and for this I decided to rewrite the server-side code of an application that was originally written in C/C++, and this server receives packages (packets) in hexadecimal of the client application, the question is: how to receive these packets (packets) in Nodejs ?
I came to create a socket for the connection but I gave a lock, follow the code done:
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));
});
Can you show the full code so we can test it too? Without seeing the rest of the application and the client part we don’t know what the problem might be. What was the problem you had? Some mistake or just "nothing happens"?
– Sergio