Example #1
0
        private static bool verifyMethod(AutoCSer.Net.TcpInternalServer.ClientSocketSender sender)
        {
            ReturnValue <bool> returnValue = TcpCall.KFServiceBase.InitializeClient(sender, KFCallManager.ClientInfo);
            bool result;

            if (returnValue.Type == ReturnType.Success && returnValue.Value)
            {
                KFCallManager.ClientInfo.ClientId = TimeUtil.AgeByUnixTime(KFCallManager.ClientInfo.ClientId);
                LogManager.WriteLog(LogTypes.Running, string.Format("连接中心成功,host={0},port={1},error={2}", KFCallManager.Host, KFCallManager.Port, returnValue.Type.ToString()), null, true);
                result = (KFCallManager.IsLogin = true);
            }
            else
            {
                LogManager.WriteLog(LogTypes.Running, string.Format("连接中心失败,host={0},port={1},error={2}", KFCallManager.Host, KFCallManager.Port, returnValue.Type.ToString()), null, true);
                result = (KFCallManager.IsLogin = false);
            }
            return(result);
        }