diff --git a/src/MqttClass/Mqtt.php b/src/MqttClass/Mqtt.php index 0b6beeb..75a8eb9 100644 --- a/src/MqttClass/Mqtt.php +++ b/src/MqttClass/Mqtt.php @@ -32,7 +32,7 @@ class Mqtt public function ConnectAndPublish($topic, $msg) { - $client = new phpMQTT($this->host,$this->port, rand(0,100), $this->cert_file, $this->debug); + $client = new MqttService($this->host,$this->port, rand(0,100), $this->cert_file, $this->debug); if ($client->connect(true)) { diff --git a/src/MqttClass/phpMQTT.php b/src/MqttClass/MqttService.php similarity index 99% rename from src/MqttClass/phpMQTT.php rename to src/MqttClass/MqttService.php index f531661..7b837fc 100644 --- a/src/MqttClass/phpMQTT.php +++ b/src/MqttClass/MqttService.php @@ -7,12 +7,14 @@ */ namespace Salman\Mqtt\MqttClass; + /* A simple php class to connect/publish to an MQTT broker */ /* phpMQTT */ -class phpMQTT { +class MqttService +{ private $socket; /* holds the socket */ private $msgid = 1; /* counter for message id */ public $keepalive = 10; /* default keepalive timmer */