This function is called by the master application (primary master process for shared memory application) to wait for a connection request from a replica.
mco_HA_attach_replica(mco_db_h db,
char* masterport,
timer_unit timeout);
db
masterport
timeout
MCO_E_NW_TIMEOUT.This function is called by the master application (primary master process for shared memory application) to wait for a connection request from a replica. Upon receiving a connection request, it sets up a communication channel and performs initial replica synchronization if needed. Usually, this function is called in a separate thread.
The mco_HA_keep_alive and mco_HA_attach_replica() threads need to
have their own separate database connections.
MCO_S_OK
MCO_E_HA_PROTOCOLERR
MCO_E_HA_IOERROR
MCO_E_NW_KILLED_BY_REPLICA
KILL_MASTER message to the master. See the mco_HA_replica_params_init() function and the MCO_HAMODE_FORCE_MASTER flag.MCO_E_NW_TIMEOUT
other MCO_E_NW_* codes