コード例 #1
0
        internal void HandleCallback()
        {
            if (CurrentRequest == null)
            {
                return;
            }
            try
            {
                HandleProgressCallback();

                if (State == HTTPConnectionStates.Upgraded)
                {
                    if (CurrentRequest != null && CurrentRequest.Response != null && CurrentRequest.Response.IsUpgraded)
                    {
                        CurrentRequest.UpgradeCallback();
                    }
                    State = HTTPConnectionStates.WaitForProtocolShutdown;
                }
                else
                {
                    CurrentRequest.CallCallback();
                }
            }
            catch (Exception ex)
            {
                HTTPManager.Logger.Exception("ConnectionBase", "HandleCallback", ex);
            }
        }
コード例 #2
0
        internal void HandleCallback()
        {
            try
            {
                HandleProgressCallback();

                if (State == HTTPConnectionStates.Upgraded)
                {
                    if (CurrentRequest != null && CurrentRequest.Response != null && CurrentRequest.Response.IsUpgraded)
                    {
                        CurrentRequest.UpgradeCallback();
                    }
                    State = HTTPConnectionStates.WaitForProtocolShutdown;
                }
                else
                {
                    if (HTTPManager.BeShowHttpLog)
                    {
                        UnityEngine.Debug.LogError("999---->ConectionBase  State:" + State);
                    }
                    CurrentRequest.CallCallback();
                }
            }
            catch (Exception ex)
            {
                HTTPManager.Logger.Exception("ConnectionBase", "HandleCallback", ex);
            }
        }
コード例 #3
0
        internal void HandleCallback()
        {
            try
            {
                HandleProgressCallback();

                if (State == HTTPConnectionStates.Upgraded)
                {
                    if (CurrentRequest != null && CurrentRequest.Response != null && CurrentRequest.Response.IsUpgraded)
                    {
                        CurrentRequest.UpgradeCallback();
                    }

                    // Change state only if state is still Upgraded, otherwise we would overwrite the newly set state
                    if (State == HTTPConnectionStates.Upgraded)
                    {
                        State = HTTPConnectionStates.WaitForProtocolShutdown;
                    }
                }
                else
                {
                    CurrentRequest.CallCallback();
                }
            }
            catch (Exception ex)
            {
                HTTPManager.Logger.Exception("ConnectionBase", "HandleCallback", ex);
            }
        }
コード例 #4
0
        internal void HandleCallback()
        {
            HandleProgressCallback();

            if (State == HTTPConnectionStates.Upgraded)
            {
                if (CurrentRequest != null && CurrentRequest.Response != null && CurrentRequest.Response.IsUpgraded)
                {
                    CurrentRequest.UpgradeCallback();
                }
                State = HTTPConnectionStates.WaitForProtocolShutdown;
            }
            else
            {
                CurrentRequest.CallCallback();
            }
        }