Can you elaborate on the advantage of int for a bool value?
For `payload_len`: Wouldn't `size_t` makes more sense?
For `count` I think it makes sense to use the same type as for the sequence number, a negative value makes no sense for me.