From abc89da58e0a321fc4d27d0ca70620cd14141d3a Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期二, 01 十二月 2020 15:34:35 +0800 Subject: [PATCH] thread local, thread pool , thread safe --- src/socket/net_mod_socket_wrapper.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/socket/net_mod_socket_wrapper.c b/src/socket/net_mod_socket_wrapper.c index e3d5c8d..1434033 100644 --- a/src/socket/net_mod_socket_wrapper.c +++ b/src/socket/net_mod_socket_wrapper.c @@ -125,6 +125,15 @@ net_mod_socket_t *sockt = (net_mod_socket_t *)_socket; return sockt->sockt->pub(node_arr, node_arr_len, topic, topic_size, content, content_size); } +int net_mod_socket_pub_timeout(void *_socket, net_node_t *node_arr, int node_arr_len, char *topic, int topic_size, void *content, int content_size, int msec){ + net_mod_socket_t *sockt = (net_mod_socket_t *)_socket; + return sockt->sockt->pub_timeout(node_arr, node_arr_len, topic, topic_size, content, content_size, msec); +} +int net_mod_socket_pub_nowait(void *_socket, net_node_t *node_arr, int node_arr_len, char *topic, int topic_size, void *content, int content_size){ + net_mod_socket_t *sockt = (net_mod_socket_t *)_socket; + return sockt->sockt->pub_nowait(node_arr, node_arr_len, topic, topic_size, content, content_size); +} + @@ -208,3 +217,14 @@ return NetModSocket::free_recv_msg_arr(arr, len); } + + + +int shm_mod_socket_remove_keys(int keys[], int length){ + return ShmModSocket::remove_keys(keys, length); +} + +int shm_mod_socket_remove_key(int key){ + int keys[] = {key}; + return ShmModSocket::remove_keys(keys, 1); +} -- Gitblit v1.8.0