public override void initializeServer( ServerConfig config,  IMsgProtocol protocol,  IList<IConnectFilter> connectFilters,  IList<IMsgFilter> requestFilters,  IList<IMsgHandler> requestHandlers, ILogger logger)
        {
            base.initializeServer(config, protocol, connectFilters, requestFilters, requestHandlers, logger);
 
            bufferManager = new BufferManager(BufferSize * MaxSessionCount, BufferSize);
            m_ReadWritePool = new SocketAsyncEventArgsPool(MaxSessionCount);
            m_ReadWritePool.Initize(bufferManager);
          
        }
        public override void initializeServer(ServerConfig config, IMsgProtocol protocol, IList<IConnectFilter> connectFilters, IList<IMsgFilter> requestFilters, IList<IMsgHandler> requestHandlers, ILogger logger)
        {
            base.initializeServer(config, protocol, connectFilters, requestFilters, requestHandlers, logger);

            m_ListenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            //数据通讯socket
            m_DataSockeet = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

            //随机生成数据端口
            // ServerDataSocketPort = ServerPort + (new Random()).Next(1, 100);
            ServerDataSocketPort = ServerPort + 1;

            r_bufferManager = new BufferManager(BufferSize * MaxSessionCount, BufferSize);
            m_ReadPool = new SocketAsyncEventArgsPool(MaxSessionCount);
            m_ReadPool.Initize(r_bufferManager);

            m_bufferManager = new ConcurrentDictionary<string, UdpSocketAsyncBuffer>();
        }
 internal void Initize(BufferManager bufferManager)
 {
     for (int i = 0; i < Capacity; i++)
     {
         SocketAsyncEventArgs args = new SocketAsyncEventArgs();
         if (bufferManager != null)
         {
             bufferManager.SetBuffer(args);
             SocketAsyncToken socketAsyncToken = new SocketAsyncToken();
             socketAsyncToken.OriginOffset = args.Offset;
             socketAsyncToken.OffsetDelta = args.Offset;
             socketAsyncToken.BufferSize = args.Buffer.Length/Capacity;
             socketAsyncToken.TokenID = string.Empty;
             args.UserToken = socketAsyncToken;
             BufferSize = socketAsyncToken.BufferSize;
         }
         Push(args);
     }
     
 }