//与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(); } }
private static void OnDBConnect(bool isSucceed) { if (isSucceed) { Log.Instance().WriteLog("dbserver connect success!"); //认证 GameBase.Network.Internal.OpenLoginSession pack = new GameBase.Network.Internal.OpenLoginSession(); mTcpClient.SendData(pack.GetBuff()); } else { Log.Instance().WriteLog("dbserver connect error!"); Log.Instance().WriteLog("Reconnect dbserver ip:" + mTcpClient.GetConnectIP() + " port:" + mTcpClient.GetConnectPort().ToString()); System.Threading.Thread.Sleep(5000); mTcpClient.ReConnect(); } }