MyQttConn * myqtt_web_socket_listener_new ( MyQttCtx ctx,
noPollConn *  listener,
MyQttConnOpts opts,
MyQttListenerReady  on_ready,
axlPointer  user_data 
)

Allows to start a MQTT server on the provided local host address and port running MQTT over WebSocket protocol.

Important note: you must call to myqtt_storage_set_path to define the path first before creating any listener. This is because creating a listener activates all server side code which among other things includes the storage loading (client subscriptions, offline publishing, etc). In the case direction, once the storage path is loaded it cannot be changed after restarting the particular context used in this operation (MyQttCtx).

Parameters
ctxThe context where the operation takes place.
listenerThe webSocket listener connection created on top of which MQTT over WebSocket is expected.
optsOptional connection options to modify default behaviour.
on_readyOptional on ready notification handler that gets called when the listener is created or a failure was found. Providing this handler makes this function to not block the caller.
user_dataOptional user defined pointer that is passed into the on_ready function (in the case the former is defined too).

See myqtt_listener_new for more information.

Returns
A newly created connection listener reference (MyQttConn). Use myqtt_conn_is_ok to check listener was created without errors.

References myqtt_conn_set_data_full(), and MYQTT_IPv6.