From 83956b12d863924936a98c9dfbece37feb0cce9c Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 04 二月 2021 14:48:04 +0800
Subject: [PATCH] update

---
 src/socket/shm_mod_socket.h |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/socket/shm_mod_socket.h b/src/socket/shm_mod_socket.h
index f5441ce..fb389a3 100644
--- a/src/socket/shm_mod_socket.h
+++ b/src/socket/shm_mod_socket.h
@@ -33,7 +33,7 @@
 	 
 	 
 
-	static int get_bus_sendbuf(bus_head_t &request_head, void *topic_buf, int topic_size, void *content_buf, int content_size, void **retbuf);
+	static int get_bus_sendbuf(bus_head_t &request_head, const void *topic_buf, int topic_size, const void *content_buf, int content_size, void **retbuf);
 
 public:
 	static size_t remove_keys(int keys[], size_t length);
@@ -87,9 +87,10 @@
 	 const struct timespec *timeout = NULL, int flag = 0);
 
 
-	// 瓒呮椂杩斿洖銆� @sec 绉� 锛� @nsec 绾崇
-	int sendandrecv_unsafe(const void *send_buf, const int send_size, const int key, void **recv_buf, int *recv_size,
-	 const  struct timespec *timeout = NULL, int flag = 0) ;
+	/**
+	 * 
+	 */
+  int recvandsend( recvandsend_callback_fn callback, const struct timespec *timeout = NULL , int flag = 0, void * user_data = NULL);
 
 	/**
 	 * 璁㈤槄鎸囧畾涓婚
@@ -98,7 +99,7 @@
 	 * @key 鎬荤嚎绔彛
 	 * @flag BUS_TIMEOUT_FLAG  BUS_NOWAIT_FLAG
 	 */
-	int  sub(char *topic, int size, int key,  const struct timespec *timeout = NULL, int flag = 0);
+	int  sub(const char *topic, int size, int key,  const struct timespec *timeout = NULL, int flag = 0);
 
 
 	 /**
@@ -108,7 +109,7 @@
 	 * @key 鎬荤嚎绔彛
 	 * @flag BUS_TIMEOUT_FLAG  BUS_NOWAIT_FLAG
 	 */
-	int desub(char *topic, int size, int key, const struct timespec *timeout = NULL, int flag = 0);
+	int desub(const char *topic, int size, int key, const struct timespec *timeout = NULL, int flag = 0);
 
 	/**
 	 * 鍙戝竷涓婚
@@ -117,7 +118,7 @@
 	 * @key 鎬荤嚎绔彛
 	 * @flag BUS_TIMEOUT_FLAG  BUS_NOWAIT_FLAG
 	 */
-	int  pub(char *topic, int topic_size, void *content, int content_size, int key, const  struct timespec *timeout = NULL, int flag = 0);
+	int  pub(const char *topic, int topic_size, const void *content, int content_size, int key, const  struct timespec *timeout = NULL, int flag = 0);
 
 
 	/**

--
Gitblit v1.8.0