The packet is uint32 (see the comment), so this should be correct. I don't know exactly what type `packet` is, but this is how the superclass handles it, so I'm assuming that `[:4]` gives us 4 bytes.