Advanced ping demon in node.js