func (packet Packet) Write(w io.Writer) error {
	if err := packet.Header.Write(w); err != nil {
		return err
	}
	_, err := w.Write(packet.Payload)
	return err
}
// Write will write a packet to a writer.
Write will write a packet to a writer.
// Write will write a packet to a writer .
func (packet Packet) Write(w io.Writer) error {
	if err := packet.Header.Write(w); err != nil {
		return err
	}
	_, err := w.Write(packet.Payload)
	return err
}
func ( packet Packet ) Write ( w io . Writer ) error { if err := packet . Header . Write ( w ) ; err != nil { return err } _ , err := w . Write ( packet . Payload ) return err }
Write will write a packet to a writer.
Write will write a packet to a writer .