10 #ifndef AIOT_TUNNEL_API_H_ 11 #define AIOT_TUNNEL_API_H_ 13 #if defined(__cplusplus) 59 aiot_tunnel_event_type
type;
char * host
Definition: aiot_tunnel_api.h:67
aiot_tunnel_option_t
Definition: aiot_tunnel_api.h:86
当tunnel实例连接代理通道成功, 触发此事件
Definition: aiot_tunnel_api.h:26
int32_t aiot_tunnel_add(void *handle, char *tunnel_id, aiot_tunnel_connect_param_t *params)
向隧道管理模块增加隧道,并建连
Definition: aiot_tunnel_api.c:443
char * path
Definition: aiot_tunnel_api.h:69
aiot_tunnel_event_type type
Definition: aiot_tunnel_api.h:59
unsigned int port
服务端口号
Definition: aiot_tunnel_api.h:52
本地服务信息
Definition: aiot_tunnel_api.h:40
char * port
Definition: aiot_tunnel_api.h:68
tunnel建联时, 网络使用的安全凭据
Definition: aiot_tunnel_api.h:119
char * token
Definition: aiot_tunnel_api.h:70
int32_t aiot_tunnel_deinit(void **handle)
结束tunnel管理模块, 销毁实例并回收资源
Definition: aiot_tunnel_api.c:111
void * aiot_tunnel_init(void)
创建tunnel管理模块实例, 并以默认值配置会话参数
Definition: aiot_tunnel_api.c:20
int32_t aiot_tunnel_setopt(void *handle, aiot_tunnel_option_t option, void *data)
配置tunnel管理模块
Definition: aiot_tunnel_api.c:44
void * aiot_tunnel_start(void *handle)
开始tunnel管理服务,作为后台线程开始运行,会一直阻塞,直至退出
Definition: aiot_tunnel_api.c:423
新增本地可提供的远程服务
Definition: aiot_tunnel_api.h:123
用户需要SDK暂存的上下文
Definition: aiot_tunnel_api.h:102
隧道建连需要的参数
Definition: aiot_tunnel_api.h:66
tunnel内部事件
Definition: aiot_tunnel_api.h:58
aiot_tunnel_event_type
tunnel内部事件类型
Definition: aiot_tunnel_api.h:22
int32_t aiot_tunnel_delete(void *handle, char *tunnel_id)
从隧道管理模块删除隧道,并断连
Definition: aiot_tunnel_api.c:475
Definition: aiot_tunnel_api.h:124
当tunnel实例从代理通道断开, 触发此事件
Definition: aiot_tunnel_api.h:30
void(* aiot_tunnel_event_handler_t)(void *handle, const aiot_tunnel_event_t *event, void *userdata)
tunnel内部事件回调函数接口定义
Definition: aiot_tunnel_api.h:83
隧道认证信息已经过期,需要重新连接
Definition: aiot_tunnel_api.h:34
int32_t aiot_tunnel_update(void *handle, char *tunnel_id, aiot_tunnel_connect_param_t *params)
更新隧道建来呢信息
Definition: aiot_tunnel_api.c:462
int32_t aiot_tunnel_stop(void *handle)
关闭tunnel管理服务,作为线程开始运行
Definition: aiot_tunnel_api.c:433
设置内部事件回调, 它在内部事件触发, 告知用户
Definition: aiot_tunnel_api.h:94