Reopen a connection while performing recovery
#include <ha/neutrino.h> int ha_ReConnectAttach(int oldcoid, _Uint32t nd, pid_t pid, int chid, unsigned index, unsigned flags);
You can use the ha_ReConnectAttach() convenience function to reopen a connection while in the recovery phase. The oldcoid argument refers to the connection that has failed. The ha_ReConnectAttach() function closes the previous connection and opens a new connection using the parameters specified by calling ConnectAttach().
The ha_ReConnectAttach() function also verifies that the new connection ID returned is the same as the oldcoid (as required by the HA library mechanism).
A new connection ID or -1 if an error occurred (errno is set).
The ha_ReConnectAttach() call returns errors as returned by the underlying ConnectAttach() call.
ha_attach(), ha_close(), Connect_Attach(), Connect_Detach(), ha_detach(), ha_open()
In the Library Reference: ConnectAttach()