controller_mqtt_transport (zotonic_mod_base v1.0.0-rc.17)

Controller for transport of MQTT data between the browser (client) and server.

This controller accepts Websocket connections and out-of-band HTTP POSTs.

The HTTP POSTs must have a valid ticket. See m_mqtt_ticket on how to obtain such a ticket and more information about tickets.

The Websocket connection is a normal MQTT transport over Websocket.

For the authentication the Websocket accepts two methods:

Summary

Functions

allowed_methods(Context)

content_types_accepted(Context)

is_websocket_request(Context)

malformed_request(Context)

process/4

upgrades_provided(Context)

websocket_handle/2

websocket_info/2

websocket_init(Context)

websocket_send_data/2

websocket_start(Context)