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