Ejemplo n.º 1
0
 public void OnError(IHTTPRequest request, IHTTPResponse response, Exception exception)
 {
     if (listener != null)
     {
         listener.OnError(request, response, exception);
     }
 }
Ejemplo n.º 2
0
 public void OnSuccess(IHTTPRequest request, IHTTPResponse response)
 {
     if (listener != null)
     {
         listener.OnSuccess(request, response);
     }
 }
Ejemplo n.º 3
0
 public virtual void OnError(IHTTPRequest request, IHTTPResponse response, Exception exception)
 {
     foreach (IHTTPListener listener in listeners)
     {
         listener.OnError(request, response, exception);
     }
 }
Ejemplo n.º 4
0
 public virtual void OnSuccess(IHTTPRequest request, IHTTPResponse response)
 {
     foreach (IHTTPListener listener in listeners)
     {
         listener.OnSuccess(request, response);
     }
 }
Ejemplo n.º 5
0
    void DebugClient(HTTPClient _client)
    {
        IHTTPResponse response = _client.Response;

        _log = _client.ToString();
        if (response == null)
        {
            _log += "\nAwaiting response...";
        }
    }
Ejemplo n.º 6
0
        public override void OnError(IHTTPResponse response, Exception exception)
        {
            IHTTPListener listener = getEffectiveListener();

            if (listener != null)
            {
                UnityThreadHelper.Dispatcher.Dispatch(delegate
                {
                    listener.OnError(this, response, exception);
                });
            }
        }
Ejemplo n.º 7
0
        public override void OnSuccess(IHTTPResponse response)
        {
            IHTTPListener listener = getEffectiveListener();

            if (listener != null)
            {
                UnityThreadHelper.Dispatcher.Dispatch(delegate
                {
                    listener.OnSuccess(this, response);
                });
            }
        }
Ejemplo n.º 8
0
        public virtual void OnError(IHTTPResponse response, Exception exception)
        {
            IHTTPListener effectiveListener = getEffectiveListener();

            if (effectiveListener != null)
            {
                try
                {
                    effectiveListener.OnError(this, response, exception);
                }
                catch (Exception exception2)
                {
                    Debug.LogError("A listener threw an exception.");
                    Debug.LogException(exception2);
                }
            }
        }
 public OnErrorHolder(IHTTPRequest request, IHTTPResponse response, Exception exception)
     : base(request, response)
 {
     this.exception = exception;
 }
 public OnSuccessHolder(IHTTPRequest request, IHTTPResponse response)
     : base(request, response)
 {
 }
 public ListenerCallHolderWithResponse(IHTTPRequest request, IHTTPResponse response)
     : base(request)
 {
     this.response = response;
 }
 public virtual void OnError(IHTTPRequest request, IHTTPResponse response, Exception exception)
 {
     enqueue(new OnErrorHolder(request, response, exception));
 }
 public virtual void OnSuccess(IHTTPRequest request, IHTTPResponse response)
 {
     enqueue(new OnSuccessHolder(request, response));
 }