mco_HA_cancel

This function instantly interrupts the replication processing.

For an overview see page HA Applications

Prototype

    void mco_HA_cancel(const char* cancel_addr,
        timer_unit timeout);

Arguments

cancel_addr
The connection string for the client socket, corresponding to mco_HA_replica_params_t cancelpoint_addr, for example "127.0.0.1:9999".
timeout
The time window for connecting to the cancel socket.

Description

This function is called by the replica to instantly interrupt replication processing. This causes the mco_HA_attach_master() to return immediately.

Return Codes

MCO_S_OK
Successful.
MCO_E_NW_INVADDR
The cancel_addr does not contain a valid connection string.
MCO_E_NW_TIMEOUT
Unable to connect to the cancel socket within the timeout period.
MCO_E_NW_SOCKET
Error in the socket() system call.
MCO_E_NW_SOCKOPT
Error in the setsocket() system call.
MCO_E_NW_SOCKIOCTL
Error in the ioctl() system call.
MCO_E_NW_SELECT
Error in the select() system call.
MCO_E_NW_CONNECT
Error in the connect() system call.