From 5822049cf164e167125dd425cb302fe4d8d56814 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 05 二月 2021 18:41:00 +0800
Subject: [PATCH] update
---
src/net/net_mod_socket.h | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/net/net_mod_socket.h b/src/net/net_mod_socket.h
index 612f784..9358311 100644
--- a/src/net/net_mod_socket.h
+++ b/src/net/net_mod_socket.h
@@ -62,10 +62,8 @@
private:
ShmModSocket shmModSocket;
- // pool req_resp_pool;
- NetConnPool *gpool;
- pthread_mutex_t sendMutex;
+ // pthread_mutex_t sendMutex;
// request header 缂栫爜涓虹綉缁滀紶杈撶殑瀛楄妭
static void * encode_request_head(net_mod_request_head_t & request);
@@ -100,7 +98,7 @@
NetModSocket();
~NetModSocket();
-
+ int stop();
/**
* 缁戝畾绔彛鍒皊ocket, 濡傛灉涓嶇粦瀹氬垯绯荤粺鑷姩鍒嗛厤涓�涓�
* @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜
@@ -192,8 +190,16 @@
int sendandrecv_timeout( const void *send_buf, const int send_size, const int send_key, void **recv_buf, int *recv_size, int sec, int nsec) ;
int sendandrecv_nowait( const void *send_buf, const int send_size, const int send_key, void **recv_buf, int *recv_size) ;
-
- /**
+
+
+
+ /**
+ * recvandsend
+ */
+ int recvandsend( recvandsend_callback_fn callback,
+ const struct timespec *timeout = NULL , int flag = 0, void * user_data = NULL );
+
+ /**
* 鍚憂ode_arr 涓殑鎵�鏈夌綉缁滆妭鐐瑰彂甯冩秷鎭�
* @node_arr 缃戠粶鑺傜偣缁�, @node_arr_len璇ユ暟缁勯暱搴�
* @topic 涓婚锛孈topic_size 璇ヤ富棰樼殑闀垮害
--
Gitblit v1.8.0