From f7337200b6703c9d64f49efc0bc571a13d479973 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期四, 04 二月 2021 09:58:27 +0800 Subject: [PATCH] add void * userdata --- src/socket/shm_socket.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socket/shm_socket.h b/src/socket/shm_socket.h index 377ba4e..aa5fc90 100644 --- a/src/socket/shm_socket.h +++ b/src/socket/shm_socket.h @@ -42,7 +42,7 @@ } shm_socket_t; // typedef void (*recv_callback_fn)(void **sendbuf, int *sendsize); -typedef std::function<void(void **sendbuf, int *sendsize)> recv_callback_fn; +typedef std::function<void(void **sendbuf, int *sendsize, void *user_data)> recv_callback_fn; size_t shm_socket_remove_keys(int keys[], size_t length); @@ -72,7 +72,7 @@ * */ int shm_recvandsend(shm_socket_t *sockt, void **recvbuf, int *recvsize, int *key, recv_callback_fn callback, - const struct timespec *timeout = NULL, int flag = 0); + const struct timespec *timeout = NULL, int flag = 0, void * user_data = NULL); -- Gitblit v1.8.0