private void WriteAttributeContentLength(int attributeContentLength, Span <byte> bytes)
        {
            if (attributeContentLength > ushort.MaxValue)
            {
                throw new ArgumentOutOfRangeException("Attribute length is too long");
            }

            NetworkBitConverter.WriteBytes(bytes.Slice(2, 2), (ushort)attributeContentLength);
        }
 private void WriteAttributeType(short attributeType, Span <byte> bytes)
 {
     NetworkBitConverter.WriteBytes(bytes.Slice(0, 2), attributeType);
 }
 private void WriteType(Span <byte> bytes)
 {
     NetworkBitConverter.WriteBytes(bytes.Slice(0, 2), type);
 }