Module mqtt.connector.luasocket

LuaSocket (and LuaSec) based connector.

This connector works with the blocking LuaSocket sockets. This connector uses LuaSec for TLS connections. This is the connector used for the included mqtt.ioloop scheduler.

When using TLS / MQTTS connections, the secure option passed to the client when creating it, can be the standard table of options as used by LuaSec for creating a context. When omitted the defaults will be; { mode="client", protocol="any", verify="none", options={ "all", "no_sslv2", "no_sslv3", "no_tlsv1" } }

Caveats:

* since the client creates a long lived connection for reading, it returns upon receiving a packet, to call an event handler. The handler must return swiftly, since while the handler runs the socket will not be reading. Any task that might take longer than a few milliseconds should be off loaded to another task.



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