ex

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Revision:
47:9e361da97763
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DuerOS-Light-SDK-v1.1.0/duer-os-light/src/http-client/baidu_mbed_soc_wrapper.h	Tue Jul 18 16:54:45 2017 +0800
@@ -0,0 +1,27 @@
+// Copyright 2017 Baidu Inc. All Rights Reserved.
+// Author: Pan Haijun, Gang Chen(chengang12@baidu.com)
+//
+// This header file provide the wrapper of the socket APIs for http module.
+
+#ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_HTTP_CLIENT_BAIDU_MBED_SOC_WRAPPER_H
+#define BAIDU_IOT_TINYDU_IOT_OS_SRC_HTTP_CLIENT_BAIDU_MBED_SOC_WRAPPER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+int mbed_socket_init(void* socket_args);
+int mbed_socket_open(int socket_handle);
+int mbed_socket_connect(int socket_handle, const char* host, const int port);
+void mbed_socket_set_blocking(int socket_handle, int blocking);
+void mbed_socket_set_timeout(int socket_handle, int timeout);
+int mbed_socket_recv(int socket_handle, void* data, unsigned size);
+int mbed_socket_send(int socket_handle, const void* data, unsigned size);
+int mbed_socket_close(int socket_handle);
+void mbed_socket_destroy(int socket_handle);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif//BAIDU_IOT_TINYDU_IOT_OS_SRC_HTTP_CLIENT_BAIDU_MBED_SOC_WRAPPER_H
+