func DecodeHdr(r io.Reader) (uint32, MessageType, error) {
	var (
		size uint32
		mt   MessageType
		err  error
	)

	if size, err = ReadUint32(r); err != nil {
		return 0, 0, err
	}

	if mt, err = ReadMessageType(r); err != nil {
		return 0, 0, err
	}

	return size, mt, nil
}
// DecodeHdr reads 5 bytes and returns the decoded size and message type. It
// may return an error if reading from the Reader fails.
DecodeHdr reads 5 bytes and returns the decoded size and message type. It
may return an error if reading from the Reader fails.
// DecodeHdr reads 5 bytes and returns the decoded size and message type . It // may return an error if reading from the Reader fails .
func DecodeHdr(r io.Reader) (uint32, MessageType, error) {
	var (
		size uint32
		mt   MessageType
		err  error
	)
	if size, err = ReadUint32(r); err != nil {
		return 0, 0, err
	}
	if mt, err = ReadMessageType(r); err != nil {
		return 0, 0, err
	}
	return size, mt, nil
}
func DecodeHdr ( r io . Reader ) ( uint32 , MessageType , error ) { var ( size uint32 mt MessageType err error ) if size , err = ReadUint32 ( r ) ; err != nil { return 0 , 0 , err } if mt , err = ReadMessageType ( r ) ; err != nil { return 0 , 0 , err } return size , mt , nil }
DecodeHdr reads 5 bytes and returns the decoded size and message type.
DecodeHdr reads 5 bytes and returns the decoded size and message type .