From 940bb9e9238488025bf41eb2b2d3df077274004f Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期三, 13 一月 2021 13:00:50 +0800
Subject: [PATCH] update

---
 src/socket/net_mod_socket.h |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/socket/net_mod_socket.h b/src/socket/net_mod_socket.h
index f3c0a54..5cf3997 100644
--- a/src/socket/net_mod_socket.h
+++ b/src/socket/net_mod_socket.h
@@ -5,7 +5,7 @@
 #include "socket_io.h"
 #include <poll.h>
 #include "socket_def.h"
-
+#include "net_conn_pool.h"
 
 
 class NetModServerSocket;
@@ -63,7 +63,9 @@
    
   ShmModSocket shmModSocket;
   // pool req_resp_pool;
- 
+  NetConnPool *gpool;
+
+  pthread_mutex_t sendMutex;
 
   // request header 缂栫爜涓虹綉缁滀紶杈撶殑瀛楄妭
   static void * encode_request_head(net_mod_request_head_t & request);
@@ -78,6 +80,10 @@
   // 鍒涘缓thread local key
   static void _createConnPoolKey_(void);
 
+
+  NetConnPool* _get_threadlocal_pool();
+  NetConnPool* _get_pool();
+
   //璇诲彇杩斿洖淇℃伅
   int read_response(int clientfd, net_mod_recv_msg_t *recv_msg);
   // 鍙戦�佽姹備俊鎭�
@@ -86,6 +92,9 @@
   int _sendandrecv_(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, int timeout);
 
+  int _sendandrecv_unsafe(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, int timeout);
+
   int _pub_(net_node_t *node_arr, int arrlen, char *topic, int topic_size, void *content, int content_size, int timeout) ;
   
 

--
Gitblit v1.8.0