typedef axl_bool(* MyQttOnAcceptedConnection)(MyQttConn *connection, axlPointer data)

Async handler definition to get a notification when a new connection is received.

This handler is executed once the connection is accepted and registered in the myqtt engine. If the function return axl_false, the connection will be dropped, without reporting any error to the remote peer.

Note this handler is called before any MQTT negotation has taken place, as opposed to MyQttOnConnectHandler which is called once the CONNECT MQTT package has been received and fully parsed.

This function can be used as a initial configuration for every connection. So, if it is only required to make a connection initialization, the handler provided must always return axl_true to avoid dropping the connection.

This handler is used by:

Parameters
connectionThe connection that has been accepted to be managed by the listener.
dataThe connection data to be passed in to the handler.
Returns
axl_true if the connection is finally accepted. axl_false to drop the connection, rejecting the incoming connection.