typedef axl_bool(* VortexOnAcceptedConnection)(VortexConnection *connection, axlPointer data)

Async handler definition to get a notification for connections created at the server side (peer that is able to accept incoming connections).

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

This function could 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 also used by the TUNNEL profile implementation to notify the application layer if the incoming TUNNEL profile should be accepted.

Note this handler is called twice on TLS activation: one for the first connection and one for the connection creation after TLS activation. This is because both connections are diferent objects with different states. This also allows to setup or run different configurations for non TLS or and for TLS enabled clients.

This handler is used by:

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