Exemplo n.º 1
0
        /// <summary>COM_STATISTICS, Get a human readable string of internal statistics.</summary>
        public string Statistics()
        {
            using (var stream = client.GetStream())
            {
                var readWriteBuffer = InternalMemoryPool.GetBuffer();
                var writer          = PacketWriter.Create(readWriteBuffer);
                ProtocolWriter.WriteStatistics(ref writer);

                var reader = SyncWriteAndRead(ref writer, 0, stream);
                reader.ThrowIfErrorPacket();

                var result = reader.ReadString(reader.Remaining);
                return(result);
            }
        }