bl_iot_sdk/components/network/https/include/https.h

77 lines
1.8 KiB
C
Raw Normal View History

2020-10-26 12:35:25 +00:00
#ifndef __HTTPS_H__
#define __HTTPS_H__
#include <stdint.h>
/**
* @brief tcp连接
*
* @par :
* tcp连接
*
* @param dst [IN] ip地址
* @param port [IN]
*
* @retval BL_TCP_ARG_INVALID dst为空
* @retval BL_TCP_CREATE_CONNECT_ERR
* @retval 0 ,tcp套接字使blTcpSslState判断连接是否完全建立
*/
int32_t blTcpSslConnect(const char* dst, uint16_t port);
/**
* @brief tcp连接状态
*
* @par :
* tcp连接状态
*
* @param fd [IN] tcp套接字
*
* @retval blTcpErrorCode bl tcp错误码
* @see blTcpErrorCode
*/
int32_t blTcpSslState(int32_t fd);
/**
* @brief tcp连接
*
* @par :
* tcp连接
*
* @param fd [IN] blTcpSslConnect创建的套接字
*
* @retval
*/
void blTcpSslDisconnect(int32_t fd);
/**
* @brief tcp数据
*
* @par :
* tcp数据
*
* @param fd [IN] tcp套接字
* @param buf [IN]
* @param len [IN] [0512)
*
* @retval blTcpErrorCode bl tcp错误码
* @see blTcpErrorCode
*/
int32_t blTcpSslSend(int32_t fd, const uint8_t* buf, uint16_t len);
/**
* @brief tcp数据
*
* @par :
* tcp数据
*
* @param fd [IN] tcp套接字
* @param buf [IN]
* @param len [IN] [0512)
*
* @retval blTcpErrorCode bl tcp错误码
* @see blTcpErrorCode
*/
int32_t blTcpSslRead(int32_t fd, uint8_t* buf, uint16_t len);
#endif