I am creating a game server and in this game server will have several channels belonging to the same server, there I was thinking if it is possible to create two listen on the same server,
var net = require('net');
var server = net.createServer((socket) => {
socket.on('data', onDataFunction());
});
server.listen(8945, '192.168.0.8', () => {
console.log('Canal 1 iniciado');
});
server.listen(8945, '192.168.0.15', () => {
console.log('Canal 2 iniciado');
});
Would this work normally?