|
Link Kit C-SDK
4.0.0
|
remote-access模块的API接口实现, 提供远程隧道的能力 更多...
#include <stdio.h>#include "core_stdinc.h"#include "core_log.h"#include "aiot_sysdep_api.h"#include "aiot_state_api.h"#include "aiot_ra_api.h"#include "aiot_ra_private.h"#include "aiot_mqtt_api.h"#include "core_mqtt.h"
函数 | |
| void * | aiot_ra_init (void) |
| 创建ra会话实例, 并以默认值配置会话参数 更多... | |
| static void | _release_all_service_info (LOCAL_SERVICES_S *local_services) |
| int32_t | aiot_ra_setopt (void *handle, aiot_ra_option_t option, void *data) |
| 配置ra会话 更多... | |
| int32_t | aiot_ra_deinit (void **handle) |
| 结束ra会话, 销毁实例并回收资源 更多... | |
| void | remote_proxy_event_handle (ra_handle_t *ra_handle, aiot_ra_event_type type, REMOTE_PROXY_INFO_S *remote_proxy_info) |
| static void | _switch_topic_handler (void *handle, const aiot_mqtt_recv_t *packet, void *userdata) |
| static int32_t | _sub_switch_topic (void *handle) |
| static int32_t | _unsub_switch_topic (void *handle) |
| void * | remote_proxy_thread (void *params) |
| void * | aiot_ra_start (void *handle) |
| 开始ra服务,作为线程开始运行 更多... | |
| int32_t | aiot_ra_stop (void *handle) |
| 停止ra服务,aiot_ra_start线程退出 更多... | |
变量 | |
| static const char * | FMT_TOPIC_SWITCH = "/sys/%s/%s/secure_tunnel/notify" |
remote-access模块的API接口实现, 提供远程隧道的能力
| void* aiot_ra_init | ( | void | ) |
创建ra会话实例, 并以默认值配置会话参数
| 非NULL | ra实例的句柄 |
| NULL | 初始化失败, 一般是内存分配失败导致 |

|
static |

| int32_t aiot_ra_setopt | ( | void * | handle, |
| aiot_ra_option_t | option, | ||
| void * | data | ||
| ) |
配置ra会话
| [in] | handle | ra会话句柄 |
| [in] | option | 配置选项, 更多信息请参考aiot_ra_option_t |
| [in] | data | 配置选项数据, 更多信息请参考aiot_ra_option_t |
| <STATE_SUCCESS | 参数配置失败 |
| >=STATE_SUCCESS | 参数配置成功 |

| int32_t aiot_ra_deinit | ( | void ** | handle | ) |
结束ra会话, 销毁实例并回收资源
| [in] | handle | 指向ra会话句柄的指针 |
| <STATE_SUCCESS | 执行失败 |
| >=STATE_SUCCESS | 执行成功 |

| void remote_proxy_event_handle | ( | ra_handle_t * | ra_handle, |
| aiot_ra_event_type | type, | ||
| REMOTE_PROXY_INFO_S * | remote_proxy_info | ||
| ) |
|
static |

|
static |

|
static |

| void* remote_proxy_thread | ( | void * | params | ) |

| void* aiot_ra_start | ( | void * | handle | ) |
开始ra服务,作为线程开始运行
| [in] | handle | 指向ra会话句柄的指针 |
| <STATE_SUCCESS | 执行失败, 更多信息请参考 STATE_REMOTE_* 定义 |
| >=STATE_SUCCESS | 执行成功 |

| int32_t aiot_ra_stop | ( | void * | handle | ) |
停止ra服务,aiot_ra_start线程退出
| [in] | handle | 指向ra会话句柄的指针 |
| <STATE_SUCCESS | 执行失败, 更多信息请参考 STATE_REMOTE_* 定义 |
| >=STATE_SUCCESS | 执行成功 |
|
static |
1.8.11