Close the listen socket on the specified IP address.
MCO_RET mco_iot_comm_stop_listen(mco_iot_comm_h comm,
const char *address);
comm
address
iface:port" or "port") to stop listening on.This function closes the listen socket. The address string must be identical to
the string passed into the mco_iot_comm_listen().
MCO_S_OK
MCO_E_IOT_INVALID_HANDLE
comm is invalid.MCO_E_IOT_AGENT_NOT_FOUND
The code snippet below stops listening on the previously created socket (see also mco_iot_comm_listen):
int main(int argc, char *argv[])
{
...
mco_iot_comm_listen(comm, "15000", 0);
...
CHECK(mco_iot_comm_stop_listen(comm, "15000"));
...
}