10 #ifndef _AIOT_TUNNEL_SWTICH_API_H_ 11 #define _AIOT_TUNNEL_SWTICH_API_H_ 13 #if defined(__cplusplus) 167 #if defined(__cplusplus) int8_t operation
隧道操作类型,【1,打开隧道】 【0,关闭隧道】
Definition: aiot_tunnel_switch_api.h:42
char * host
隧道连接的地址
Definition: aiot_tunnel_switch_api.h:46
uint64_t created_time
隧道token创建的时间,设备系统时间,单位ms
Definition: aiot_tunnel_switch_api.h:66
int32_t aiot_tunnel_switch_setopt(void *handle, aiot_tunnel_switch_option_t option, void *data)
设置tunnel_switch参数
Definition: aiot_tunnel_switch_api.c:327
char * path
隧道连接的具体路径
Definition: aiot_tunnel_switch_api.h:54
int32_t aiot_tunnel_switch_deinit(void **handle)
销毁tunnel_switch实例, 释放资源
Definition: aiot_tunnel_switch_api.c:356
配置选项数量最大值, 不可用作配置参数
Definition: aiot_tunnel_switch_api.h:120
模块依赖的MQTT句柄
Definition: aiot_tunnel_switch_api.h:95
void(* aiot_tunnel_switch_recv_handler_t)(void *handle, const aiot_tunnel_switch_recv_data_t *recv, void *userdata)
tunnel_swtich模块消息接收回调函数的函数原型定义, 当模块接收到服务器下行数据后将调用此回调函数, 并将消息数据通过recv参数输入给用户, 同时将用户上下文数据指针通过userdata参数返回给用户
Definition: aiot_tunnel_switch_api.h:83
Definition: aiot_tunnel_switch_api.h:34
打开隧道连接
Definition: aiot_tunnel_switch_api.h:27
char * tunnel_id
字符串,隧道ID,用于标示指定隧道
Definition: aiot_tunnel_switch_api.h:38
数据接收回调函数, tunnel_switch接收物联网平台的下行消息后调用此回调函数
Definition: aiot_tunnel_switch_api.h:104
aiot_tunnel_switch_option_t
Definition: aiot_tunnel_switch_api.h:85
uint64_t expired_time
隧道token过期的剩余时间,单位s
Definition: aiot_tunnel_switch_api.h:62
char * token
隧道建连的token
Definition: aiot_tunnel_switch_api.h:58
void * aiot_tunnel_switch_init()
初始化tunnel_switch实例
Definition: aiot_tunnel_switch_api.c:306
char * close_reason
如果是关闭操作,反馈是隧道过期,还是用户关闭
Definition: aiot_tunnel_switch_api.h:70
aiot_tunnel_switch_operation_t
Definition: aiot_tunnel_switch_api.h:19
int32_t aiot_tunnel_switch_request(void *handle)
发送获取隧道信息
Definition: aiot_tunnel_switch_api.c:378
更新隧道连接信息
Definition: aiot_tunnel_switch_api.h:31
关闭隧道连接
Definition: aiot_tunnel_switch_api.h:23
char * port
隧道连接的端口号
Definition: aiot_tunnel_switch_api.h:50
指向用户上下文数据的指针
Definition: aiot_tunnel_switch_api.h:115