From f68d32c9f4b2f46d26d96839801d1888a93f93ed Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期四, 18 一月 2024 14:25:29 +0800 Subject: [PATCH] less memory --- src/socket/shm_socket.h | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/socket/shm_socket.h b/src/socket/shm_socket.h index 8e874d1..a900e4e 100644 --- a/src/socket/shm_socket.h +++ b/src/socket/shm_socket.h @@ -23,7 +23,7 @@ size_t size; void * buf; - char uuid[64]; + char uuid[1]; int action; } shm_packet_t; @@ -34,7 +34,6 @@ typedef struct shm_socket_t { shm_socket_type_t socket_type; int key; - char proc_id[MAX_STR_LEN]; bool force_bind; pthread_mutex_t mutex; @@ -62,13 +61,12 @@ int shm_socket_force_bind(shm_socket_t * socket, int key) ; -int shm_socket_bind_proc_id(shm_socket_t *sockt, const char *buf, int len); /** * @flags : BUS_NOWAIT_FLAG */ -int shm_sendto(shm_socket_t *socket, const void *buf, const int size, const int key, const struct timespec * timeout = NULL, const int flags=0); +int shm_sendto(shm_socket_t *socket, const void *buf, const int size, const int key, const struct timespec * timeout = NULL, const int flags=0, int reset = 0, int data_set = 0); -int shm_recvfrom(shm_socket_t *socket, void **buf, int *size, int *key, const struct timespec * timeout = NULL, int flags=0); +int shm_recvfrom(shm_socket_t *socket, void **buf, int *size, int *key, const struct timespec * timeout = NULL, int flags=0, int reset = 0, int data_set = 0); int shm_sendandrecv(shm_socket_t *socket, const void *send_buf, const int send_size, const int send_key, void **recv_buf, int *recv_size, const struct timespec * timeout = NULL, int flags = 0); -- Gitblit v1.8.0