IEnumerator processPing(string url, Action <bool> onComplete) { IEnumerator query = HalperWeb.query(url, delegate(string answer) { onComplete(true); }, delegate() { onComplete(false); }); while (query.MoveNext()) { yield return(null); } }
public void query(string url, Action <string> onComplete, Action onTimeout, float timeout = 3f) { StartCoroutine(HalperWeb.query(url, onComplete, onTimeout, timeout)); }