From 203df24a403a8c0cd8e93d0f33eaf10de2788969 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期四, 06 八月 2020 10:22:46 +0800 Subject: [PATCH] add desub --- src/socket/include/dmod_socket.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/socket/include/dmod_socket.h b/src/socket/include/dmod_socket.h index 5e97e2a..0998b1d 100644 --- a/src/socket/include/dmod_socket.h +++ b/src/socket/include/dmod_socket.h @@ -48,6 +48,8 @@ int _sub_( void *topic, int size, int port, struct timespec *timeout, int flags); int _pub_( void *topic, int topic_size, void *content, int content_size, int port, struct timespec *timeout, int flags); + void _proxy_desub( char *topic, int port); + int _desub_( void *topic, int size, int port, struct timespec *timeout, int flags); static void foreach_subscripters(std::function<void(SHMKeySet *, SHMKeySet::iterator)> cb) ; public: DModSocket(); @@ -116,6 +118,16 @@ int sub_nowait(void *topic, int size, int port); + /** + * 鍙栨秷璁㈤槄鎸囧畾涓婚 + * @topic 涓婚 + * @size 涓婚闀垮害 + * @port 鎬荤嚎绔彛 + */ + int desub( void *topic, int size, int port); + // 瓒呮椂杩斿洖銆� @sec 绉� 锛� @nsec 绾崇 + int desub_timeout(void *topic, int size, int port, struct timespec *timeout); + int desub_nowait(void *topic, int size, int port) ; /** * 鍙戝竷涓婚 -- Gitblit v1.8.0