void OnItemHttpEnd(HttpClient client, HttpListenerStatus status)
        {
            DonwloadItem downItem = null;

            var listener = client.Listener as HttpClientFileStream;

            if (listener != null && listener.UserData != null)
            {
                downItem          = listener.UserData as DonwloadItem;
                listener.UserData = null;
            }

            switch (status)
            {
            case HttpListenerStatus.hsDone:
            {
                if (downItem != null)
                {
                    downItem.SetNull();
                }
                if (IsAllHttpDone())
                {
                    ToNextState();
                }
                break;
            }

            case HttpListenerStatus.hsError:
            {
                if (downItem != null)
                {
                    downItem.SetNull();
                    ClearList();

                    UnityEngine.Debug.LogErrorFormat("[downloadFileErr]{0} download: {1:D} isOk: {2}", downItem.item.fileContentMd5,
                                                     downItem.item.readBytes, downItem.item.isDone.ToString());
                    AutoUpdateMgr.Instance.Error(AutoUpdateErrorType.auError_FileDown, -1);

                    m_IsError = true;
                }
                break;
            }
            }
        }
        void OnItemHttpProcess(HttpClient client)
        {
            var listener = client.Listener as HttpClientFileStream;

            if (listener == null)
            {
                return;
            }
            DonwloadItem downItem = listener.UserData as DonwloadItem;

            if (downItem == null)
            {
                return;
            }

            var  item         = downItem.item;
            long oldReadBytes = item.readBytes;

            item.readBytes = listener.StartPos + listener.ReadBytes;
            long delta = item.readBytes - oldReadBytes;

            if (delta > 0)
            {
                double curM = AutoUpdateMgr.Instance.CurDownM;
                curM += ((double)delta) / ((double)1024 * 1024);
                AutoUpdateMgr.Instance.CurDownM = curM;
            }
            if (listener.ReadBytes >= listener.MaxReadBytes)
            {
                item.isDone = true;
            }

            downItem.item = item;

            AutoUpdateMgr.Instance.DownloadUpdateToUpdateTxt(item);

            DoUpdateDownProcess();
        }