Esempio n. 1
0
        static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub.hub _hub = new hub.hub(args);

            Int64 oldtick = 0;
            Int64 tick    = 0;

            while (true)
            {
                oldtick = tick;
                tick    = _hub.poll();

                if (hub.hub.closeHandle.is_close)
                {
                    log.log.operation(new System.Diagnostics.StackFrame(true), tick, "server closed, hub server:{0}", hub.hub.uuid);
                    break;
                }

                Int64 ticktime = (tick - oldtick);
                if (ticktime < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 2
0
        private static void Main(String[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub _hub = new hub(args);

            while (true)
            {
                var ticktime = _hub.poll();

                if (closeHandle.is_close)
                {
                    log.log.operation(new System.Diagnostics.StackFrame(true), service.timerservice.Tick, "server closed, hub server:{0}", hub.uuid);
                    break;
                }

                if (ticktime < 50)
                {
                    Thread.Sleep(5);
                }
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub.hub _hub = new hub.hub(args);

            players = new playermng();

            login _login = new login();

            hub.hub.modules.add_module("login", _login);

            Int64 tick      = Environment.TickCount;
            Int64 tickcount = 0;

            while (true)
            {
                Int64 tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick    = tmptick + tickcount * UInt32.MaxValue;
                }
                tick = tmptick;

                _hub.poll(tick);

                if (hub.hub.closeHandle.is_close)
                {
                    Console.WriteLine("server closed, hub server " + hub.hub.uuid);
                    break;
                }

                tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick    = tmptick + tickcount * UInt32.MaxValue;
                }
                Int64 ticktime = (tmptick - tick);
                tick = tmptick;

                if (ticktime < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 4
0
        private static void Main(String[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub _hub = new hub(args);

            Int64 tick      = Environment.TickCount;
            Int64 tickcount = 0;

            while (true)
            {
                Int64 tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick    = tmptick + tickcount * UInt32.MaxValue;
                }
                tick = tmptick;

                _hub.poll(tick);

                if (closeHandle.is_close)
                {
                    Console.WriteLine("server closed, hub server " + _hub.uuid);
                    break;
                }

                tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick    = tmptick + tickcount * UInt32.MaxValue;
                }
                Int64 ticktime = (tmptick - tick);
                tick = tmptick;

                if (ticktime < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            disable = false;

            hub.hub _hub = new hub.hub(args);

            hub.hub.gates.clientDisconnect += onClientDisconnect;

            room_num = hub.hub.config.get_value_int("room_num");
            players  = new playermanager();
            tables   = new tablemng();

            room          _room          = new room();
            mj_huanghuang _mj_huanghuang = new mj_huanghuang();
            chat          _chat          = new chat();
            gm            _gm            = new gm();
            match         _match         = new match();

            hub.hub.modules.add_module("room", _room);
            hub.hub.modules.add_module("mj_huanghuang", _mj_huanghuang);
            hub.hub.modules.add_module("chat", _chat);
            hub.hub.modules.add_module("gm", _gm);
            hub.hub.modules.add_module("match", _match);

            while (true)
            {
                if (hub.hub.closeHandle.is_close)
                {
                    log.log.trace(new System.Diagnostics.StackFrame(true), service.timerservice.Tick, "server closed, hub server " + hub.hub.uuid);
                    break;
                }

                if (_hub.poll() < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub.hub _hub = new hub.hub(args);

            while (true)
            {
                if (hub.hub.closeHandle.is_close)
                {
                    log.log.operation(new System.Diagnostics.StackFrame(true), tick, "server closed, hub server:{0}", hub.hub.uuid);
                    break;
                }

                if (_hub.poll() < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub.hub _hub = new hub.hub(args);

            players = new playermng();

            login _login = new login();

            hub.hub.modules.add_module("login", _login);

            Int64 oldtick = 0;
            Int64 tick    = 0;

            while (true)
            {
                oldtick = tick;
                tick    = _hub.poll();

                if (hub.hub.closeHandle.is_close)
                {
                    log.log.trace(new System.Diagnostics.StackFrame(true), tick, "server closed, hub server:{0}", hub.hub.uuid);
                    break;
                }

                Int64 ticktime = (tick - oldtick);
                if (ticktime < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 8
0
        public static void Main(String[] args)
        {
            if (args.Length <= 0)
            {
                return;
            }

            hub _hub = new hub(args);

            Int64 tick = Environment.TickCount;
            Int64 tickcount = 0;
            while (true)
            {
                Int64 tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick = tmptick + tickcount * UInt32.MaxValue;
                }
                tick = tmptick;

                _hub.poll(tick);

                if (_hub._closehandle.is_close)
                {
                    Console.WriteLine("server closed, hub server " + _hub.uuid);
                    break;
                }

                tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick = tmptick + tickcount * UInt32.MaxValue;
                }
                Int64 ticktime = (tmptick - tick);
                tick = tmptick;

                if (ticktime < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }
Esempio n. 9
0
 public center_msg_handle(hub _hub_, closehandle _closehandle_, centerproxy _centerproxy_)
 {
     _hub         = _hub_;
     _closehandle = _closehandle_;
     _centerproxy = _centerproxy_;
 }
Esempio n. 10
0
 public dbproxy_msg_handle(hub _hub)
 {
     _hub_ = _hub;
 }
Esempio n. 11
0
 public center_msg_handle(hub _hub_, closehandle _closehandle_, centerproxy _centerproxy_)
 {
     _hub = _hub_;
     _closehandle = _closehandle_;
     _centerproxy = _centerproxy_;
 }