コード例 #1
0
        public void StartUp()
        {
            server    = new Server();
            incomming = new Incoming(this);

            // register message callback sink
            server.RegisterClose(OnConnectionClose);

            // load assets before create game world and receive client connections
            LoadAssets();

            // start the server, block till program exit
            server.Start(ip, port);
        }
コード例 #2
0
ファイル: GameServer.cs プロジェクト: reblGreen/MMORPG
        public void StartUp()
        {
            server    = new Server();
            incomming = new Incoming(this);

            // register message callback sink
            server.RegisterClose(OnConnectionClose);

            // load assets before create game world and receive client connections
            LoadAssets();

            // sync chat history to db / threadpool
            ThreadPool.QueueUserWorkItem(incomming.SyncChatHistory, 10000);

            // start the server, block till program exit
            server.Start(ip, port);
        }