axlPointer myqtt_listener_set_port_sharing_handling ( MyQttCtx ctx,
const char *  local_addr,
const char *  local_port,
MyQttPortShareHandler  handler,
axlPointer  user_data 
)

Allows to install a port share handler that will be called to detect and activate alternative transports that must be enabled before activating normal MQTT session.

Parameters
ctxThe context the operation will take place. Handlers installed on this context will not affect to other running contexts on the same process.
local_addrReference to the local address this handler must be limited. Pass in NULL in the case you don't want any filtering (that is, to avoid calling this handler if local address value doesn't match).
local_portReference to the local port this handler must be limited. Pass in NULL in the case you don't want any filtering (that is, to avoid calling this handler if local port value doesn't match).
handlerThe handler that will be called to detect the transport.
user_dataUser defined pointer that will be passed in into the handler when called.
Returns
A handle that represent the installed port sharing handler or NULL if it fail. The value returned can be used to remove this handler later.

References myqtt_mutex_lock(), and myqtt_mutex_unlock().