Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. req.connection.addListener('close', function () {
  2. res.end();
  3. clearInterval(sendData);
  4. });
  5. req.connection.addListener('end', function () {
  6. res.end();
  7. clearInterval(sendData);
  8. });
  9.  
  10. sendData = setInterval(function()
  11. {
  12. res.write('Ping')
  13. }, res_interval);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement