add close() and isListening() to MqttServer
This commit is contained in:
parent
c6a4111677
commit
63e8f2055e
@ -106,6 +106,16 @@ bool MqttServer::listen(const QHostAddress &address, quint16 port, MqttUserValid
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MqttServer::isListening() const
|
||||||
|
{
|
||||||
|
return d_ptr->server->isListening();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MqttServer::close()
|
||||||
|
{
|
||||||
|
d_ptr->server->close();
|
||||||
|
}
|
||||||
|
|
||||||
QStringList MqttServer::clients() const
|
QStringList MqttServer::clients() const
|
||||||
{
|
{
|
||||||
QStringList clientIds;
|
QStringList clientIds;
|
||||||
|
|||||||
@ -49,6 +49,8 @@ public:
|
|||||||
void setMaximumSubscriptionsQoS(Mqtt::QoS maximumSubscriptionQoS);
|
void setMaximumSubscriptionsQoS(Mqtt::QoS maximumSubscriptionQoS);
|
||||||
|
|
||||||
bool listen(const QHostAddress &address = QHostAddress::Any, quint16 port = 1883, MqttUserValidator *userValidator = nullptr);
|
bool listen(const QHostAddress &address = QHostAddress::Any, quint16 port = 1883, MqttUserValidator *userValidator = nullptr);
|
||||||
|
bool isListening() const;
|
||||||
|
void close();
|
||||||
|
|
||||||
QStringList clients() const;
|
QStringList clients() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user