ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/http-client/baidu_mbed_soc_wrapper.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | // Copyright 2017 Baidu Inc. All Rights Reserved. |
| TMBOY | 47:9e361da97763 | 2 | // Author: Pan Haijun, Gang Chen(chengang12@baidu.com) |
| TMBOY | 47:9e361da97763 | 3 | // |
| TMBOY | 47:9e361da97763 | 4 | // This header file provide the wrapper of the socket APIs for http module. |
| TMBOY | 47:9e361da97763 | 5 | |
| TMBOY | 47:9e361da97763 | 6 | #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_HTTP_CLIENT_BAIDU_MBED_SOC_WRAPPER_H |
| TMBOY | 47:9e361da97763 | 7 | #define BAIDU_IOT_TINYDU_IOT_OS_SRC_HTTP_CLIENT_BAIDU_MBED_SOC_WRAPPER_H |
| TMBOY | 47:9e361da97763 | 8 | |
| TMBOY | 47:9e361da97763 | 9 | #ifdef __cplusplus |
| TMBOY | 47:9e361da97763 | 10 | extern "C" { |
| TMBOY | 47:9e361da97763 | 11 | #endif |
| TMBOY | 47:9e361da97763 | 12 | int mbed_socket_init(void* socket_args); |
| TMBOY | 47:9e361da97763 | 13 | int mbed_socket_open(int socket_handle); |
| TMBOY | 47:9e361da97763 | 14 | int mbed_socket_connect(int socket_handle, const char* host, const int port); |
| TMBOY | 47:9e361da97763 | 15 | void mbed_socket_set_blocking(int socket_handle, int blocking); |
| TMBOY | 47:9e361da97763 | 16 | void mbed_socket_set_timeout(int socket_handle, int timeout); |
| TMBOY | 47:9e361da97763 | 17 | int mbed_socket_recv(int socket_handle, void* data, unsigned size); |
| TMBOY | 47:9e361da97763 | 18 | int mbed_socket_send(int socket_handle, const void* data, unsigned size); |
| TMBOY | 47:9e361da97763 | 19 | int mbed_socket_close(int socket_handle); |
| TMBOY | 47:9e361da97763 | 20 | void mbed_socket_destroy(int socket_handle); |
| TMBOY | 47:9e361da97763 | 21 | |
| TMBOY | 47:9e361da97763 | 22 | #ifdef __cplusplus |
| TMBOY | 47:9e361da97763 | 23 | } |
| TMBOY | 47:9e361da97763 | 24 | #endif |
| TMBOY | 47:9e361da97763 | 25 | |
| TMBOY | 47:9e361da97763 | 26 | #endif//BAIDU_IOT_TINYDU_IOT_OS_SRC_HTTP_CLIENT_BAIDU_MBED_SOC_WRAPPER_H |
| TMBOY | 47:9e361da97763 | 27 |
