This function explicitly creates a cancel socket that can be used in the application.
MCO_RET mco_HA_create_cancel_socket(mco_db_h db,
const char* cancelpoint_addr,
/*OUT*/ SOCKET* cancel_socket);
db
cancelpoint_addr
mco_HA_replica_params_t cancelpoint_addr.cancel_socket
This function explicitly creates a cancel socket that can be used in the application. If the cancel
socket was created by this call (and not closed by
mco_HA_destroy_cancel_socket()), mco_HA_attach_master() will not create or close the
cancel_socket, but instead use the created socket. In this case, the cancelpoint_addr
field in mco_HA_replica_params_t is ignored. If another thread calls mco_HA_cancel(),
mco_HA_attach_master() interrupts processing and leaves the cancel socket in a readable
state. Application code can then use the cancel socket in select() or poll() system calls.
MCO_S_OK
MCO_E_NW_INVADDR
cancelpoint_addr does not contain a valid connection string.MCO_E_NW_SOCKET
socket() system call.MCO_E_NW_SOCKOPT
setsockopt() system call.MCO_E_NW_SOCKIOCTL
ioctl() system call.MCO_E_NW_BIND
bind() system call.