typedef MyQttPublishCodes(* MyQttdOnPublish)(MyQttdCtx *ctx, MyQttdDomain *domain, MyQttCtx *myqtt_ctx, MyQttConn *conn, MyQttMsg *msg, axlPointer user_data)

Async notification handler that gets called once a PUBLISH message is received on a listener connection.

This handler allows to control message publication to currently registered connection with general options and/or to implement especific actions upon message reception.

It's important to note that this handler is called before any publish/relay operation takes place.

This handler is used by:

Parameters
ctxThe MyQttdCtx context (not the MyQttCtx) where the operation is taking place.
domainThe MyQttdDomain domain where the operation is taking place.
myqtt_ctxThe context where the operation takes place (the MyQttCtx engine started for this domain).
connThe connection where the PUBLISH message was received.
msgThe message received. The handler must not release message received. It can acquire references to it.
user_dataUser defined pointer passed in into the function once it gets called.
Returns
The function must report the publish code to the engine so it can act upon it.