コード例 #1
0
    public void login(ConnectInternetResultHandler SocketComplete, ConnectInternetResultHandler accountSrvComplete)
    {
        this.ConnectSocketComplete = SocketComplete;
        this.accountSrvComplete    = accountSrvComplete;
        Msg msg = new Msg(AccountSrvCodeMap.Cmd.CMD_ACCOUNT_LOGIN);

        msg.AddParam(AccountSrvCodeMap.Param.ACCOUNT_SRV_VERSION, appCfg.Version);
        testLoginTimes = DEFAULT_TEST_LOGIN_TIME;
        Cookie cookie = CookieData.Load();

        LoginWithCookie(cookie, msg);
    }
コード例 #2
0
    public void srvInfoReturn(Msg msg)
    {
        int rscode = ( int )msg.GetParam(AccountSrvCodeMap.Param.RS_CODE);

        if (rscode == AccountSrvCodeMap.RsCode.SUCCESS)
        {
            srvIp   = ( string )msg.GetParam(AccountSrvCodeMap.Param.ACCOUNT_SRV_IP);
            srvPort = ( int )msg.GetParam(AccountSrvCodeMap.Param.ACCOUNT_SRV_PORT);
            Cookie cookie = CookieData.Load();
            OpenSoketConnect(cookie);
        }
        else
        {
            OnSocketLoginReturn(msg);
        }
    }