Open Himmelt opened 1 year ago
Try something like this:
public static IByteBuffer WriteUnsignedInt(this IByteBuffer buffer, uint value)
{
unchecked
{
return buffer.WriteInt((int)value);
}
}
public static IByteBuffer WriteUnsignedIntLE(this IByteBuffer buffer,uint value)
{
unchecked
{
return buffer.WriteIntLE((int)value);
}
}
why?
Probably missing by mistake, I would PR them, but this repository is dead.
@ScarletKuro Thanks, it works.
There are ReadUnsignedInt/ReadUnsignedIntLE/GetUnsignedInt/GetUnsignedIntLE/SetUnsignedInt/SetUnsignedIntLE methods, but no WriteUnsignedInt/WriteUnsignedIntLE ? why? How should I do to write an uint with little-endian to the ByteBuf ? https://github.com/Azure/DotNetty/blob/00c23606cc8afb699ee17790c51a85c0abf6d296/src/DotNetty.Buffers/IByteBuffer.cs#L885-L899