Loading socket.js +1 −1 Original line number Original line Diff line number Diff line Loading @@ -60,7 +60,7 @@ server.on('connection',function(socket){ socket.setEncoding('utf8'); socket.setEncoding('utf8'); socket.setTimeout(60000,function(){ socket.setTimeout(900000,function(){ // called after timeout -> same as socket.on('timeout') // called after timeout -> same as socket.on('timeout') // it just tells that soket timed out => its ur job to end or destroy the socket. // it just tells that soket timed out => its ur job to end or destroy the socket. // socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket // socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket Loading Loading
socket.js +1 −1 Original line number Original line Diff line number Diff line Loading @@ -60,7 +60,7 @@ server.on('connection',function(socket){ socket.setEncoding('utf8'); socket.setEncoding('utf8'); socket.setTimeout(60000,function(){ socket.setTimeout(900000,function(){ // called after timeout -> same as socket.on('timeout') // called after timeout -> same as socket.on('timeout') // it just tells that soket timed out => its ur job to end or destroy the socket. // it just tells that soket timed out => its ur job to end or destroy the socket. // socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket // socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket Loading