From 8c42a659c0cc9178d1f1305acb41dfbf4a8697ef Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 22 十月 2020 16:20:26 +0800
Subject: [PATCH] update
---
src/socket/net_mod_socket_wrapper.h | 31 ++++++++++++++++++++-----------
1 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/src/socket/net_mod_socket_wrapper.h b/src/socket/net_mod_socket_wrapper.h
index a30224e..9e135fb 100644
--- a/src/socket/net_mod_socket_wrapper.h
+++ b/src/socket/net_mod_socket_wrapper.h
@@ -7,21 +7,30 @@
extern "C" {
#endif
-struct net_mod_socket
+struct net_mod_socket_t
{
NetModSocket *sockt;
};
-void * net_mod_socket_open();
-void net_mod_socket_close();
/**
- * 鍚憂ode_arr 涓殑鎵�鏈夌綉缁滆妭鐐瑰彂閫佽姹傛秷鎭紝鑺傜偣鐨勮繑鍥炰俊鎭眹鎬诲苟瀛樺偍鍦╮ecv_arr涓�
- * @node_arr 缃戠粶鑺傜偣缁�, @node_arr_len璇ユ暟缁勯暱搴�
- * @send_buf 鍙戦�佺殑娑堟伅锛孈send_size 璇ユ秷鎭綋鐨勯暱搴�
- * @recv_arr 杩斿洖鐨勫簲绛旀秷鎭粍锛孈recv_arr_size 璇ユ暟缁勯暱搴�
- * @return 鎴愬姛鍙戦�佺殑鑺傜偣鐨勪釜鏁�
+ * 鍒涘缓
*/
-int net_mod_socket_sendandrecv(net_node_t *node_arr, int node_arr_len, void *send_buf, int send_size,
+void * net_mod_socket_open();
+
+/**
+ * 鍏抽棴
+ */
+void net_mod_socket_close(void *_sockt);
+
+ /**
+ * 鍚憂ode_arr 涓殑鎵�鏈夌綉缁滆妭鐐瑰彂閫佽姹傛秷鎭紝鑺傜偣鐨勮繑鍥炰俊鎭眹鎬诲苟瀛樺偍鍦╮ecv_arr涓�
+ * @node_arr 缃戠粶鑺傜偣缁�, @node_arr_len璇ユ暟缁勯暱搴�
+ * @send_buf 鍙戦�佺殑娑堟伅锛孈send_size 璇ユ秷鎭綋鐨勯暱搴�
+ * @recv_arr 杩斿洖鐨勫簲绛旀秷鎭粍锛孈recv_arr_size 璇ユ暟缁勯暱搴�
+ * @return 鎴愬姛鍙戦�佺殑鑺傜偣鐨勪釜鏁�
+ * 璇ユ柟娉曚笉鏄嚎绋嬪畨鍏ㄧ殑锛屼笉鑳芥湁澶氫釜绾跨▼鍚屾椂浣跨敤涓�涓猻ocket
+ */
+int net_mod_socket_sendandrecv(void *_sockt, net_node_t *node_arr, int node_arr_len, void *send_buf, int send_size,
net_mod_recv_msg_t ** recv_arr, int *recv_arr_size);
/**
@@ -29,7 +38,7 @@
* @arr 娑堟伅缁�
* @size 娑堟伅缁勭殑闀垮害
*/
-static void net_mod_socket_free_recv_msg_arr(net_mod_recv_msg_t * arr, size_t size);
+void net_mod_socket_free_recv_msg_arr(net_mod_recv_msg_t * arr, int size);
/**
* 鍚憂ode_arr 涓殑鎵�鏈夌綉缁滆妭鐐瑰彂甯冩秷鎭�
@@ -38,7 +47,7 @@
* @content 鍐呭锛孈content_size 鍐呭闀垮害
* @return 鎴愬姛鍙戝竷鐨勮妭鐐圭殑涓暟
*/
-int net_mod_socket_pub(net_node_t *node_arr, int node_arr_len, char *topic, int topic_size, void *content, int content_size);
+int net_mod_socket_pub(void *_sockt, net_node_t *node_arr, int node_arr_len, char *topic, int topic_size, void *content, int content_size);
#ifdef __cplusplus
--
Gitblit v1.8.0