Interrupt the asynchronous connect initiated through the mco_iot_comm_connect_async().
MCO_RET mco_iot_comm_stop_connect(mco_iot_comm_h comm,
const char *address);
comm
address
iface:port")This function interrupts the asynchronous connect initiated through the mco_iot_comm_connect_async().
The address string must be identical to the string passed into the mco_iot_comm_connect_async().
MCO_S_OK
MCO_E_IOT_INVALID_HANDLE
comm is invalidMCO_E_IOT_AGENT_NOT_FOUND
The code snippet below interrupts the connection previously initiated with mco_iot_comm_connect_async():
int main(int argc, char *argv[])
{
...
CHECK(mco_iot_comm_connect_async(comm, "192.168.0.1:15000", 2000, 10, 1000, 0));
...
CHECK(mco_iot_comm_stop_connect(comm, "192.168.0.1:15000"));
...
}