예제 #1
0
파일: Login.cs 프로젝트: zj831007/knight
 /// <summary>
 /// 客户端请求用户登陆
 /// </summary>
 private void ClientLoginRequest(string rConnectorURL, int rConnectorPort)
 {
     NetworkClient.Instance.Connect(rConnectorURL, rConnectorPort, () =>
     {
         string rMsg   = mAccountName + "|" + mPassword + "|" + DateTime.Now.Ticks;
         string rToken = CryptoUtility.Encrypt(rMsg, UtilTool.SessionSecrect);
         GamePlayProtocol.DoClientLoginRequest(rToken);
     });
 }
예제 #2
0
파일: Login.cs 프로젝트: zj831007/knight
        /// <summary>
        /// 请求连接服务器
        /// </summary>
        public void LoginGateServer(string rGateHost, int nGatePort, int nServerID, string rAccountName, string rAccountPassword)
        {
            mAccountName = rAccountName;
            mPassword    = rAccountPassword;

            mGateHost = rGateHost;
            mGatePort = nGatePort;
            mServerID = nServerID;

            Debug.Log("LoginGateServer");
            NetworkClient.Instance.Connect(this.mGateHost, this.mGatePort, () =>
            {
                GamePlayProtocol.DoClientQueryGateEntryRequest(mAccountName);
            });
        }