void 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.

The handler provided on this function is called once the connection provided is closed. This is useful to detect connection broken or "broken pipe".

If you require to set a user pointer to be received by the handler, you can use vortex_connection_set_on_close_full.

connectionThe connection being closed
on_close_handlerThe handler that will be executed.

References vortex_mutex_lock(), and vortex_mutex_unlock().