func (pkt *PubCompPacket) WriteTo(w io.Writer, version byte) (n int, err error) {
	var d int
	n, err = pkt.header.WriteTo(w)
	if err != nil {
		return
	}
	d, err = writeInt(w, pkt.ID)
	n += d
	return
}
// WriteTo writes the packet to the io.Writer.
WriteTo writes the packet to the io.Writer.
// WriteTo writes the packet to the io . Writer .
func (pkt *PubCompPacket) WriteTo(w io.Writer, version byte) (n int, err error) {
	var d int
	n, err = pkt.header.WriteTo(w)
	if err != nil {
		return
	}
	d, err = writeInt(w, pkt.ID)
	n += d
	return
}
func ( pkt * PubCompPacket ) WriteTo ( w io . Writer , version byte ) ( n int , err error ) { var d int n , err = pkt . header . WriteTo ( w ) if err != nil { return } d , err = writeInt ( w , pkt . ID ) n += d return }
WriteTo writes the packet to the io.Writer.
WriteTo writes the packet to the io . Writer .