예제 #1
0
 public void SetHooks(UWebMgr.OnWebTextResponse responseHook, UWebMgr.OnWebError errorHook)
 {
     if (m_Routine != null)
     {
         m_Routine.SetHooks(responseHook, errorHook);
     }
 }
예제 #2
0
    public void Post(UWebRequest request, UWebArg customArgs, UWebMgr.OnWebResponse onResponse, UWebMgr.OnWebError onError, float timeOutInterval)
    {
        UWebRequestProxy proxy = new UWebRequestProxy();

        proxy.m_Request = request;

        if (request.isCompressed)
        {
            customArgs.Add("compress", 1);
        }

        if (m_isUrlArgs)
        {
            proxy.m_UrlArgs    = customArgs.ToString();
            proxy.m_MergedArgs = customArgs.GetMergedArgs();
        }
        else
        {
            proxy.m_Form = customArgs.ToForm();
        }

        proxy.m_OnResponse      = onResponse;
        proxy.m_OnError         = onError;
        proxy.m_TimeOutInterval = timeOutInterval;
        proxy.m_LocalArg        = customArgs.localArg;

        m_RequestQueue.Enqueue(proxy);
    }
예제 #3
0
 public void SetHooks(UWebMgr.OnWebTextResponse responseHook, UWebMgr.OnWebError errorHook)
 {
     m_ResponseHook = responseHook;
     m_ErrorHook    = errorHook;
 }