func (p *Pingreq) Decode(src []byte) (int, error) {
	return nakedDecode(src, PINGREQ)
}
Decode reads from the byte slice argument. It returns the total number of
bytes decoded, and whether there have been any errors during the process.
package packet
func nakedLen() int {
	return headerLen(0)
}
func nakedDecode(src []byte, t Type) (int, error) {
	hl, _, rl, err := decodeHeader(src, t)
	if rl != 0 {
		return hl, makeError(t, "expected zero remaining length")
	}
	return hl, err
}
func nakedEncode(dst []byte, t Type) (int, error) {
	return encodeHeader(dst, 0, 0, nakedLen(), t)
}
type Disconnect struct{}
func NewDisconnect() *Disconnect {
	return &Disconnect{}
}
func (d *Disconnect) Type() Type {
	return DISCONNECT
}
func (d *Disconnect) Len() int {
	return nakedLen()
}
func (d *Disconnect) Decode(src []byte) (int, error) {
	return nakedDecode(src, DISCONNECT)
}
func (d *Disconnect) Encode(dst []byte) (int, error) {
	return nakedEncode(dst, DISCONNECT)
}
func (d *Disconnect) String() string {
	return "<Disconnect>"
}
type Pingreq struct{}
func NewPingreq() *Pingreq {
	return &Pingreq{}
}
func (p *Pingreq) Type() Type {
	return PINGREQ
}
func (p *Pingreq) Len() int {
	return nakedLen()
}