using System; namespace Impostor.Api.Net.Messages { public interface IMessageReader : IDisposable { /// /// Gets the tag of the message. /// byte Tag { get; } /// /// Gets the buffer of the message. /// byte[] Buffer { get; } /// /// Gets the offset of our current in the entire . /// int Offset { get; } /// /// Gets the current position of the reader. /// int Position { get; } /// /// Gets the length of the buffer. /// int Length { get; } IMessageReader ReadMessage(); bool ReadBoolean(); sbyte ReadSByte(); byte ReadByte(); ushort ReadUInt16(); short ReadInt16(); uint ReadUInt32(); int ReadInt32(); float ReadSingle(); string ReadString(); ReadOnlyMemory ReadBytesAndSize(); ReadOnlyMemory ReadBytes(int length); int ReadPackedInt32(); uint ReadPackedUInt32(); void CopyTo(IMessageWriter writer); void Seek(int position); void RemoveMessage(IMessageReader message); IMessageReader Copy(int offset = 0); } }