Esempio n. 1
0
        //与dbserver通讯的客户端

        private void OnDBConnectEventHandler(bool isSucceed)
        {
            if (isSucceed)
            {
                Log.Instance().WriteLog("dbserver connect success!");
                GameBase.Network.Internal.OpenMapSession pack = new GameBase.Network.Internal.OpenMapSession();
                mTcpDBClient.SendData(pack.GetBuff());
                mbConnect = true;
            }
            else
            {
                Log.Instance().WriteLog("dbserver connect error!");
                Log.Instance().WriteLog("Reconnect  dbserver ip:" + mTcpDBClient.GetConnectIP() +
                                        " port:" + mTcpDBClient.GetConnectPort().ToString());
                // System.Threading.Thread.Sleep(5000);
                mbConnect = false;
                // mTcpDBClient.ReConnect();
            }
        }
Esempio n. 2
0
 //与dbserver通讯的客户端
 private void OnDBConnectEventHandler(bool isSucceed)
 {
     if (isSucceed)
     {
         Log.Instance().WriteLog("dbserver connect success!");
         GameBase.Network.Internal.OpenMapSession pack = new GameBase.Network.Internal.OpenMapSession();
         mTcpDBClient.SendData(pack.GetBuff());
         mbConnect = true;
     }
     else
     {
         Log.Instance().WriteLog("dbserver connect error!");
         Log.Instance().WriteLog("Reconnect  dbserver ip:" + mTcpDBClient.GetConnectIP() +
             " port:" + mTcpDBClient.GetConnectPort().ToString());
        // System.Threading.Thread.Sleep(5000);
         mbConnect = false;
        // mTcpDBClient.ReConnect();
     }
 }