/// <summary> /// 初始化加载器 /// </summary> public void initializeSocketServer() { //读取配置 m_Protocol = new FixSizeProtocol(5); m_RequestHandlers = new List<IMsgHandler>(); m_RequestHandlers.Add(new ResponseHandler()); m_RequestFilters = new List<IMsgFilter>(); // m_RequestFilters.Add(new Protocol.RequestFilters.DateEcrptyFilter()); // m_RequestFilters.Add(new Protocol.Handlers.ServerMarkFilter()); #if DEBUG m_ServerConfig = new ServerConfig(); m_ServerConfig.BackLogCount = 5; m_ServerConfig.BufferSize = 1024; m_ServerConfig.MaxSessionCount = 10; m_ServerConfig.ServerIpAddress = "192.168.10.2"; m_ServerConfig.ServerMode = ServerMode.UDP; m_ServerConfig.ServerPort = 6000; m_ServerConfig.SessionTimeout = 20*60; m_ServerConfig.ServerName = "ATONServer"; m_ConnectFilterList = new List<IConnectFilter>(); #endif m_SocketServer = SocketServerFactory.CreateSocketServer(m_ServerConfig.ServerMode); m_SocketServer.initializeServer(m_ServerConfig, m_Protocol, m_ConnectFilterList, m_RequestFilters, m_RequestHandlers, new ConsoleLogger(LoggerLevelE.INFO)); }