Esempio n. 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);
        }
Esempio n. 2
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();

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

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