Exemple #1
0
        static void Main(string[] args)
        {
            //TODO 读取配置文件
            //ConfigHandler;
            ConfigHandler config = new ConfigHandler();

            config.Init("webapps\\config.xml");
            IOCPServer server = new IOCPServer(Config.SERVER_PORT, Config.MAX_CLIENT);

            server.Start();
            ConsoleLogWriter.Instance.Write("Main", LogPrio.Info, "#### 服务器启动完成 ####");
            System.Console.ReadLine();
        }
Exemple #2
0
 public DaemonThread(IOCPServer asyncSocketServer)
 {
     m_asyncSocketServer = asyncSocketServer;
     m_thread            = new Thread(DaemonThreadStart);
     m_thread.Start();
 }