using System; namespace Shadowsocks.Protocol { public interface IProtocolMessage : IEquatable { public int Serialize(Memory buffer); /// /// /// /// /// Tuple represent load state, /// when success, length is how many byte has been taken /// when fail, length is how many byte required, 0 is parse error /// public (bool success, int length) TryLoad(ReadOnlyMemory buffer); } }