VortexConnectionOnClose vortex_connection_set_on_close VortexConnection connection,
VortexConnectionOnClose  on_close_handler
 

Allows to set a new on close handler to be executed only once the connection is being closed.

Parameters:
connection The connection being closed
on_close_handler The handler that will be executed.
Returns:
Previous on close set.