code: func (r *Packet) MarshalBinary() ([]byte, error) {
  	r.Header.PacketSize = packetSize(r)
  
  	buf, _ := MarshalBinary(r.Header)
  
  	return append(buf, r.Payload...), nil
  }
docs: // MarshalBinary implements the encoding.BinaryMarshaler interface