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/dgram_mod_socket.h | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/socket/include/dgram_mod_socket.h b/src/socket/include/dgram_mod_socket.h index 1670def..a43c197 100644 --- a/src/socket/include/dgram_mod_socket.h +++ b/src/socket/include/dgram_mod_socket.h @@ -56,10 +56,10 @@ * @port 鍙戦�佺粰璋� * @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜 */ -int dgram_mod_sendandrecv(void * _socket, const void *send_buf, const int send_size, const int port, void **recv_buf, int *recv_size) ; +int dgram_mod_sendandrecv(void * _socket, const void *send_buf, const int send_size, const int send_port, void **recv_buf, int *recv_size) ; // 瓒呮椂杩斿洖銆� @sec 绉� 锛� @nsec 绾崇 -int dgram_mod_sendandrecv_timeout(void * _socket, const void *send_buf, const int send_size, const int port, void **recv_buf, int *recv_size, int sec, int nsec) ; -int dgram_mod_sendandrecv_nowait(void * _socket, const void *send_buf, const int send_size, const int port, void **recv_buf, int *recv_size) ; +int dgram_mod_sendandrecv_timeout(void * _socket, const void *send_buf, const int send_size, const int send_port, void **recv_buf, int *recv_size, int sec, int nsec) ; +int dgram_mod_sendandrecv_nowait(void * _socket, const void *send_buf, const int send_size, const int send_port, void **recv_buf, int *recv_size) ; /** @@ -81,6 +81,16 @@ int dgram_mod_sub_nowait(void * _socket, void *topic, int size, int port); +/** + * 鍙栨秷璁㈤槄鎸囧畾涓婚 + * @topic 涓婚 + * @size 涓婚闀垮害 + * @port 鎬荤嚎绔彛 + */ +int dgram_mod_desub(void * _socket, void *topic, int size, int port); +// 瓒呮椂杩斿洖銆� @sec 绉� 锛� @nsec 绾崇 +int dgram_mod_desub_timeout(void * _socket, void *topic, int size, int port, int sec, int nsec); +int dgram_mod_desub_nowait(void * _socket, void *topic, int size, int port); /** * 鍙戝竷涓婚 -- Gitblit v1.8.0