- mqtt-loop client #!optional (timeout 1000)procedure
The main network loop for the client. This must be called frequently to keep communications between the client and broker working. This is carried out by mqtt-loop-forever, which are the recommended ways of handling the network loop. It must not be called inside a callback. If incoming data is present it will then be processed. Outgoing commands, from e.g. mqtt-publish, are normally sent immediately that their function is called, but this is not always possible. mqtt-loop will also attempt to send any remaining outgoing messages, which also includes commands that are part of the flow for messages with QoS>0.
- timeout: Maximum number of milliseconds to wait for network activity in the select() call before timing out. Set to 0 for instant return.