Exemplo n.º 1
0
        /// <summary>
        /// 服务器初始化
        /// </summary>
        public void Init() {
            cfg = new ConfigTimer(); cfg.Start();
            redis = new RedisTimer(); redis.Start();

            Const.users = new Dictionary<long, ClientSession>();
            //var v = RedisUtil.Get("aaa");
            //Console.WriteLine(v);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 服务器关闭
 /// </summary>
 public void Close() {
     redis.Stop(); redis = null;
     cfg.Stop(); cfg = null;
 }