From 6a1a06f1506b88b769955ddc57035cf166f64ef4 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 22 一月 2021 17:59:18 +0800
Subject: [PATCH] update
---
src/socket/net_mod_socket.h | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/socket/net_mod_socket.h b/src/socket/net_mod_socket.h
index ce45aa6..612f784 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);
@@ -77,6 +79,10 @@
static void _destroyConnPool_(void *_pool);
// 鍒涘缓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);
@@ -151,8 +157,8 @@
* 缂虹偣锛氶樆濉炵殑锛屾�ц兘涓嶅sendandrecv
*
*/
- int sendandrecv_safe(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 sendandrecv_safe(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);
/**
--
Gitblit v1.8.0