private void PrepareSocketAsyncEventArgsPool()
        {
            m_ReadWritePool = new SocketAsyncEventArgsPoolSlim(Config.MaxConnectionNumber);
            // preallocate pool of SocketAsyncEventArgs objects
            SocketAsyncEventArgs socketEventArg;

            for (int i = 0; i < Config.MaxConnectionNumber; i++)
            {
                //Pre-allocate a set of reusable SocketAsyncEventArgs
                socketEventArg           = new SocketAsyncEventArgs();
                socketEventArg.UserToken = new AsyncUserToken();
                m_BufferManager.SetBuffer(socketEventArg);

                // add SocketAsyncEventArg to the pool
                m_ReadWritePool.Push(new SocketAsyncEventArgsProxy(socketEventArg));
            }
        }
        public override void Stop()
        {
            base.Stop();

            if (m_ListenSocket != null)
            {
                m_ListenSocket.Close();
                m_ListenSocket = null;
            }

            if (m_ReadWritePool != null)
            {
                m_ReadWritePool = null;
            }

            if (m_BufferManager != null)
            {
                m_BufferManager = null;
            }

            VerifySocketServerRunning(false);
        }