Ejemplo n.º 1
0
    private IEnumerator sendReplay(Dictionary <string, object> postdata, Action <bool> callback)
    {
        var www = PRequest.Prepare(SECTION, POSTRESULT, postdata);

        yield return(www);

        // no point threading this one due to tiny ammount of data
        var response = PRequest.FastProcess <ReplaySentResponse>(www);

        callback(response.success);
    }
Ejemplo n.º 2
0
    private IEnumerator SendPing(Dictionary <string, object> postdata, int attempts)
    {
        while (attempts > 0)
        {
            var www = PRequest.Prepare(SECTION, PING, postdata);
            yield return(www);

            // no point threading this one due to tiny size of response
            var response = PRequest.FastProcess <ResponseBase>(www);

            // if successful exit
            if (response.success)
            {
                break;
            }

            attempts--;
        }
    }