I\'m making a web app that requires that I check to see if remote servers are online or not. When I run it from the command line, my page load goes up to a full 60s (for 8 e
Pitching in with a websocket solution...
function ping(ip, isUp, isDown) { var ws = new WebSocket("ws://" + ip); ws.onerror = function(e){ isUp(); ws = null; }; setTimeout(function() { if(ws != null) { ws.close(); ws = null; isDown(); } },2000); }