From c479ef57baaaa28964fc3ec8d80ff99dffa7d49f Mon Sep 17 00:00:00 2001
From: fujuntang <fujuntang@smartai.com>
Date: 星期三, 10 十一月 2021 09:49:29 +0800
Subject: [PATCH] Fix the system hang issue when the app is killed contantly.

---
 src/net/net_mod_socket_wrapper.h |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/net/net_mod_socket_wrapper.h b/src/net/net_mod_socket_wrapper.h
index b869510..c9ac313 100644
--- a/src/net/net_mod_socket_wrapper.h
+++ b/src/net/net_mod_socket_wrapper.h
@@ -67,7 +67,7 @@
  *
  * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜
  */
-int net_mod_socket_sendto(void *_socket, const void *buf, const int size, const int key);
+int net_mod_socket_sendto(void *_socket, const void *buf, const int size, const int key, int reset = 0, int data_set = 0);
 
 /**
  * @brief  鍙戦�佷俊鎭紝鍦ㄦ寚瀹氭椂闂村唴娌″彂閫佸畬鎴愪篃杩斿洖銆� 
@@ -80,7 +80,7 @@
  *
  * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜
  */
-int net_mod_socket_sendto_timeout(void *_socket, const void *buf, const int size, const int key, int sec, int nsec);
+int net_mod_socket_sendto_timeout(void *_socket, const void *buf, const int size, const int key, int sec, int nsec, int reset = 0, int data_set = 0);
 
 /**
  * @brief 鍙戦�佷俊鎭紝鏃犺鏄惁鍙戦�佸畬鎴愮珛鍒昏繑鍥炪��
@@ -91,7 +91,7 @@
  *
  * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜
  */
-int net_mod_socket_sendto_nowait(void *_socket, const void *buf, const int size, const int key);
+int net_mod_socket_sendto_nowait(void *_socket, const void *buf, const int size, const int key, int reset = 0, int data_set = 0);
 
 /**
  * @brief 绛夊緟鎺ユ敹淇℃伅锛岀洿鍒版湁娑堟伅鎺ュ彈鍒版墠杩斿洖
@@ -102,7 +102,7 @@
  * 
  * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜
  */
-int net_mod_socket_recvfrom(void *_socket, void **buf, int *size, int *key);
+int net_mod_socket_recvfrom(void *_socket, void **buf, int *size, int *key, int reset = 0, int data_set = 0);
 
 /**
  * @brief 绛夊緟鎺ユ敹淇℃伅锛屽湪鎸囧畾鐨勬椂闂村唴鍗充娇娌℃湁鎺ュ彈鍒版秷鎭篃瑕佽繑鍥�
@@ -115,7 +115,7 @@
  * 
  * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜
  */
-int net_mod_socket_recvfrom_timeout(void *_socket, void **buf, int *size, int *key, int sec, int nsec);
+int net_mod_socket_recvfrom_timeout(void *_socket, void **buf, int *size, int *key, int sec, int nsec, int reset = 0, int data_set = 0);
 
 /**
  * @brief 绛夊緟鎺ユ敹淇℃伅锛岀洿鍒版湁娑堟伅鎺ュ彈鍒版墠杩斿洖
@@ -126,10 +126,14 @@
  * 
  * @return 0鏄垚鍔燂紝鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜
  */
-int net_mod_socket_recvfrom_nowait(void *_socket, void **buf, int *size, int *key);
+int net_mod_socket_recvfrom_nowait(void *_socket, void **buf, int *size, int *key, int reset = 0, int data_set = 0);
 
-
-
+void net_mod_socket_int_set(void * _socket, int data);
+void net_mod_socket_svr_set(void * _socket, int data);
+int net_mod_socket_int_get(void * _socket);
+int net_mod_socket_svr_get(void * _socket);
+void net_mod_socket_buf_data_set(void * _socket, std::string str, int val);
+int net_mod_socket_buf_data_get(void * _socket, std::string str);
 
 /**
  * @brief 璺ㄦ満鍣ㄥ彂閫佹秷鎭苟鎺ュ彈杩斿洖鐨勫簲绛旀秷鎭紝鐩村埌鍙戦�佸畬鎴愭墠杩斿洖

--
Gitblit v1.8.0