Return the communicator the current connection belongs to.
mco_iot_comm_h mco_iot_conn_get_comm(const iot_connection_h iotc);
iotc
iot_connection_h).This function returns the communicator the current connection belongs to.
mco_iot_comm_h
// onConnect callback
int iot_on_connect(mco_iot_connection_h iotc, void *context)
{
mco_iot_comm_h comm = mco_iot_conn_get_comm(iotc);
// Use the communicator comm
...
return IOT_CALLBACK_OK;
}