void vortex_listener_set_on_connection_accepted ( VortexCtx ctx,
VortexOnAcceptedConnection  on_accepted,
axlPointer  _data 
)

Allows to configure a handler that is executed once a connection have been accepted.

The handler to be configured could be used as a way to get notifications about connections created, but also as a filter for connections that must be dropped.

Parameters
ctxThe context where the operation will be performed.
on_acceptedThe handler to be executed.
_dataUser space data to be passed in to the handler executed.

Note this handler is called before any socket exchange to allow denying as soon as possible. Though the handler receives a reference to the VortexConnection to be accepted/denied, it is only provided to allow storing or reconfiguring the connection.

In other words, when the handler is called, the BEEP session is still not established. If you need to execute custom operations once the connection is fully registered with the BEEP session established, see vortex_connection_set_connection_actions with CONNECTION_STAGE_POST_CREATED.

This function supports setting up several handlers which will be called in the order they were configured. The function is thread safe.

References vortex_mutex_lock(), and vortex_mutex_unlock().

Referenced by vortex_pull_init().