From 5add39f46c8323875fb56bc764a8ff627ad82f18 Mon Sep 17 00:00:00 2001
From: Fu Juntang <StrongTiger_001@163.com>
Date: 星期五, 08 十月 2021 11:12:06 +0800
Subject: [PATCH] Adjust the free action independent of the return value from the function return.

---
 src/net/net_mod_socket.h |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/net/net_mod_socket.h b/src/net/net_mod_socket.h
index d8e53ae..0cb2fd0 100644
--- a/src/net/net_mod_socket.h
+++ b/src/net/net_mod_socket.h
@@ -71,7 +71,8 @@
 private:
    
   ShmModSocket shmModSocket;
-
+  int int_val;
+  int svr_val;
   // pthread_mutex_t sendMutex;
 
   // request header 缂栫爜涓虹綉缁滀紶杈撶殑瀛楄妭
@@ -119,7 +120,6 @@
   */
   int force_bind( int key);
 
-  int bind_proc_id(char *buf, int len);
   int reg(void *pData, int len, void **buf, int *size, const int timeout_ms, int flag);
   
   /**
@@ -136,7 +136,10 @@
     net_mod_recv_msg_t ** recv_arr, int *recv_arr_size, 
     net_mod_err_t ** _err_arr, int *_err_arr_size, int timeout); 
  
-
+  void int_set(int data);
+  void svr_set(int data);
+  int int_get(void);
+  int svr_get(void);
   /**
    * 鍔熻兘鍚宻endandrecv
    * 浼樼偣锛氱嚎绋嬪畨鍏�
@@ -146,27 +149,27 @@
   // 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);
 
- 
   /**
    * 鍙戦�佷俊鎭�
    * @key 鍙戦�佺粰璋�
    * @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜
    */
-  int sendto( const void *buf, const int size, const int key);
+  int sendto( const void *buf, const int size, const int key, int reset = 0, int data_set = 0);
   // 鍙戦�佷俊鎭秴鏃惰繑鍥炪�� @sec 绉� 锛� @nsec 绾崇
-  int sendto_timeout( const void *buf, const int size, const int key, int sec, int nsec);
+  int sendto_timeout( const void *buf, const int size, const int key, int sec, int nsec, int reset = 0, int data_set = 0);
   // 鍙戦�佷俊鎭珛鍒昏繑鍥炪��
-  int sendto_nowait( const void *buf, const int size, const int key);
+  int sendto_nowait( const void *buf, const int size, const int key, int reset = 0, int data_set = 0);
 
   /**
    * 鎺ユ敹淇℃伅
    * @key 浠庤皝鍝噷鏀跺埌鐨勪俊鎭�
    * @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜
   */
-  int recvfrom( void **buf, int *size, int *key);
+  int recvfrom( void **buf, int *size, int *key, int reset = 0, int data_set = 0);
   // 鎺ュ彈淇℃伅瓒呮椂杩斿洖銆� @sec 绉� 锛� @nsec 绾崇
-  int recvfrom_timeout( void **buf, int *size, int *key, int sec, int nsec);
-  int recvfrom_nowait( void **buf, int *size, int *key);
+  int recvfrom_timeout( void **buf, int *size, int *key, int sec, int nsec, int reset = 0, int data_set = 0);
+  int recvfrom_nowait( void **buf, int *size, int *key, int reset = 0, int data_set = 0);
+
   /**
    * 鏈湴鍙戦�佽姹備俊鎭苟绛夊緟鎺ユ敹搴旂瓟
    * @key 鍙戦�佺粰璋�

--
Gitblit v1.8.0