#include <flux/core.h> typedef int (*flux_comms_error_f)(flux_t *h, void *arg); void flux_comms_error_set (flux_t *h, flux_comms_error_f fun, void *arg);
Link with -lflux-core.
flux_comms_error_set() configures an optional callback
be called internally by
libflux_core if an error occurs when sending
or receiving messages on the handle
arg is an optional argument passed through to the callback function.
The callback may assume that
errno is valid. A typical callback in an
application might log the error and then exit.
If a comms error function is not registered, or if the function returns -1,
error handling proceeds as normal. Be aware that further access attempts
h are likely to fail and the callback may be invoked again.
In advanced use cases, the callback may resolve the error and return 0, in which case the errant low level message send or receive call is retried. This mode should be considered experimental at this time.