mco_iot_conn_get_agent_id
此函数返回远程节点的agent_id
。
mco_iot_agent_id_t mco_iot_conn_get_agent_id(
const iot_connection_h iotc
);
有关概述,请参阅主动复制结构页面。
参数
iotc
iot_connection_h
连接句柄。
返回
mco_iot_agent_id_t
远端节点agent_id
。
示例
// onConnect回调
int iot_on_connect(mco_iot_connection_h iotc, void *context)
{
mco_iot_agent_id_t agent_id = mco_iot_conn_get_agent_id(iotc);
...
return IOT_CALLBACK_OK;
}
文件
- 头文件:
mcoiot.h
- 源文件:
mcoiotcomm.c
- 库:
libmcoiotcomm.a