Serialize/deserialize mismatches in manually written networking code are really hard to debug, especially if the serializer and the deserializer are in different methods. Some of us can even attest to having to debug such errors, especially in very long packets.
If gadget records when certain PacketByteBuf methods were called, however, this would mean that all relevant read methods on the PacketByteBuf could explode immediately if there is a mismatch in packet formats, which would making debugging these issues much easier. Additionally, this would add the ability to make a nice view for packets that don't have custom deserializers and unwrappers on gadget's side.
Serialize/deserialize mismatches in manually written networking code are really hard to debug, especially if the serializer and the deserializer are in different methods. Some of us can even attest to having to debug such errors, especially in very long packets.
If gadget records when certain PacketByteBuf methods were called, however, this would mean that all relevant read methods on the PacketByteBuf could explode immediately if there is a mismatch in packet formats, which would making debugging these issues much easier. Additionally, this would add the ability to make a nice view for packets that don't have custom deserializers and unwrappers on gadget's side.