I wrote the next code:
socket.setTimeout(2000);
socket.on('timeout', function() {
console.log("Timeout");
});
socket.on('data', function(data){})
I send a data to my socket, but when I finish to send this data, the timeout doesn't occuer.
There is no socket.end() in my code.