From 09fdbecd7ce09d9988adcd079e886a21941666bf Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期三, 14 十月 2020 11:30:53 +0800 Subject: [PATCH] udpate --- src/socket/net_mod_socket_wrapper.h | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/socket/net_mod_socket_wrapper.h b/src/socket/net_mod_socket_wrapper.h index a30224e..5d1786f 100644 --- a/src/socket/net_mod_socket_wrapper.h +++ b/src/socket/net_mod_socket_wrapper.h @@ -7,13 +7,21 @@ extern "C" { #endif -struct net_mod_socket +struct net_mod_socket_t { NetModSocket *sockt; }; +/** + * 鍒涘缓 + */ void * net_mod_socket_open(); -void net_mod_socket_close(); + +/** + * 鍏抽棴 + */ +void net_mod_socket_close(void *_sockt); + /** * 鍚憂ode_arr 涓殑鎵�鏈夌綉缁滆妭鐐瑰彂閫佽姹傛秷鎭紝鑺傜偣鐨勮繑鍥炰俊鎭眹鎬诲苟瀛樺偍鍦╮ecv_arr涓� * @node_arr 缃戠粶鑺傜偣缁�, @node_arr_len璇ユ暟缁勯暱搴� @@ -21,7 +29,7 @@ * @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, +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 +37,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 +46,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