Module mqtt.loop

Auto detect the IO loop to use.

Interacting with the supported IO loops (ioloop, copas, and nginx) requires specific implementations to get it right. This module will auto-detect the environment and return the proper module from;

* mqtt.loop.ioloop

* mqtt.loop.copas

* mqtt.loop.nginx

Since the selection is based on a.o. packages loaded, make sure that in case of using the copas scheduler, you require it before the mqtt modules.

Usage:

    --local copas = require "copas"   -- only if you use Copas
    local mqtt = require "mqtt"
    local add_client = require("mqtt.loop").add  -- returns a loop-specific function
    
    local client = mqtt.create { ... options ... }
    add_client(client)  -- works for ioloop, copas, and nginx
    


generated by LDoc 1.5.0 Last updated 2024-10-13 22:14:17