src/Server/Asyn/MQTT/Message/Header/PUBLISH.php
protected function decodeVariableHeader(& $packet_data, & $pos)
    {
        $topic = Utility::UnpackStringWithLength($packet_data, $pos);
        $this->message->setTopic($topic);

        if ($this->getQos() > 0) {
            # Decode Packet Identifier if QoS > 0
            $this->decodePacketIdentifier($packet_data, $pos);
        }

        return true;
    }
protected function decodeVariableHeader(& $packet_data, & $pos)
    {
        $topic = Utility::UnpackStringWithLength($packet_data, $pos);
        $this->message->setTopic($topic);

        if ($this->getQos() > 0) {
            # Decode Packet Identifier if QoS > 0
            $this->decodePacketIdentifier($packet_data, $pos);
        }

        return true;
    }
protected function decodeVariableHeader ( & $ packet_data , & $ pos ) { $ topic = Utility :: UnpackStringWithLength ( $ packet_data , $ pos ) ; $ this -> message -> setTopic ( $ topic ) ; if ( $ this -> getQos ( ) > 0 ) { # Decode Packet Identifier if QoS > 0 $ this -> decodePacketIdentifier ( $ packet_data , $ pos ) ; } return true ; }
Decode Variable Header
Topic, Packet Identifier

@param string & $packet_data
@param int    & $pos
@return bool
Decode Variable Header Topic Packet Identifier