mco_iot_conn_get_comm
此函数返回当前连接所属的通信器。
mco_iot_comm_h mco_iot_conn_get_comm(
const iot_connection_h iotc
);
有关概述,请参阅主动复制结构页面。
参数
iotc
iot_connection_h
连接句柄。
返回
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;
}
文件
- 头文件:
mcoiot.h
- 源文件:
mcoiotcomm.c
- 库:
libmcoiotcomm.a