Changed class name to Mqtt Service
This commit is contained in:
parent
a65d3421e4
commit
199c767ddc
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
Loading…
Reference in New Issue