How to use the un-blocking method of MqttClient

后端 未结 1 1364
再見小時候
再見小時候 2021-01-27 07:29

When I try the below code to connect to the mosquitto broker, as you know, connecting to the broker might takes few seconds/minutes, and during that time when the b

1条回答
  •  不知归路
    2021-01-27 08:13

    what button? establishing a connection is almost instantly.

    There are asynchronous versions of mqtt. Code samples for that. If you want to make the synchronous non-blocking. You could start it up in another thread.

    0 讨论(0)
提交回复
热议问题