Пример #1
0
        public void BindAfterSend(int nRet, int groupId, SGData sgData)
        {
            nRet = sgData.GetResult();
            string strMsg = "";

            if (nRet == 0)
            {
                HsNetWork hs = null;
                if (m_DicNetWork.TryGetValue(groupId, out hs) == true)
                {
                    hs = m_DicNetWork[groupId];
                    sgDicRecvData.SetLoginData(hs, groupId, sgData);
                    SGLoginData sgLoginBind    = (SGLoginData)sgDicRecvData.GetLoginData(groupId);
                    Int64       nFilePartSize  = sgLoginBind.GetFilePartSize();
                    Int64       nFileBandWidth = sgLoginBind.GetFileBandWidth();
                    int         nLinkCheckTime = sgLoginBind.GetLinkCheckTime();
                    nLinkCheckTime = (nLinkCheckTime * 2) / 3;
                    bool bDummy = sgLoginBind.GetUseDummyPacket();
                    hs.SetNetworkInfo(nFilePartSize, nFileBandWidth, bDummy, nLinkCheckTime);
                    SendUserInfoEx(groupId, sgLoginBind.GetUserID());
                }
            }
            else
            {
                strMsg = SGLoginData.LoginFailMessage(nRet);
                PageEventArgs e = new PageEventArgs();
                e.result = nRet;
                e.strMsg = strMsg;
                LoginResult_Event(groupId, e);
            }
        }