Return the communicator the current connection belongs to.
mco_iot_comm_h mco_iot_conn_get_comm(const iot_connection_h iotc);
| iotc | The connection handle (iot_connection_h) |
This function returns the communicator the current connection belongs to.
| mco_iot_comm_h | The communicator this connection belongs to |
// 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;
}