I have set tcp_time_wait_interval
as 1000 (1 sec). But even after closing the connection, TCP TIME_WAIT state are accumulating. Can anyone please help me on this.
var net = require('net');
var HOST = 'localhost';
var PORT = 9790;
net.createServer(function(sock) {
sock.on('data', function(data) {
console.log('Application Name : ' + data);
sock.write('Connected to "' + data + '"');
});
sock.on('close', function(data) {
console.log('CLOSED: ' + sock.remoteAddress +' '+ sock.remotePort);
});
}).listen(PORT, HOST);
console.log('Server listening on ' + HOST +':'+ PORT);
In LINUX sysems it's working fine. TIME_WAIT is not accumulating. So I hope there is nothing wrong with the code.