Quantcast
Channel: Questions in topic: "nodejs"
Viewing all articles
Browse latest Browse all 130

Node.js net disconnection not detecting issue

$
0
0
I am new to node.js . In my program , following codes using for client close detection var server = net.createServer(function (stream) { stream.setEncoding('utf8'); stream.on('data', function (data) { if (data == '\0') { var x = policy(); stream.write(x); var server_date = new Date(); var serv_sec = server_date.getSeconds(); return; } }); stream.on('error', function () { }); stream.on('close', function () { }); when application closing , this 'close' function is working properly , whenever net disconnecting , that is not detecting by node.js

Viewing all articles
Browse latest Browse all 130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>