zhangmeng
2020-08-03 0bde715af72b7b3d55ad3aac816d7cd153a60b42
libcsoftbus_func.h
@@ -175,18 +175,26 @@
 * @return 0 成功, 其他值 失败的错误码
 */
typedef int(*tfn_dgram_socket_sendto) (void*, const void*, const int, const int);
// 发送信息超时返回。 @sec 秒 , @nsec 纳秒
typedef int(*tfn_dgram_socket_sendto_timeout) (void*, const void*, const int, const int, int, int);
// 发送信息立刻返回。
typedef tfn_dgram_socket_sendto tfn_dgram_socket_sendto_nowait;
/**
 * 接收信息
 * @port 从谁哪里收到的信息
 * @return 0 成功, 其他值 失败的错误码
*/
typedef int(*tfn_dgram_socket_recvfrom) (void*, void**, int*, int*);
typedef int(*tfn_dgram_socket_recvfrom_timeout) (void*, void**, int*, int*, int, int);
typedef tfn_dgram_socket_recvfrom tfn_dgram_socket_recvfrom_nowait;
/**
 * 发送请求信息并等待接收应答
 * @port 发送给谁
 * @return 0 成功, 其他值 失败的错误码
*/
typedef int(*tfn_dgram_socket_sendandrecv) (void*, const void*, const int, const int, void**, int*);
typedef int(*tfn_dgram_socket_sendandrecv_timeout) (void*, const void*, const int, const int, void**, int*, int, int);
typedef tfn_dgram_socket_sendandrecv tfn_dgram_socket_sendandrecv_nowait;
/**
 * 启动bus
 *
@@ -200,6 +208,8 @@
 * @port 总线端口
 */
typedef int(*tfn_dgram_socket_sub) (void*, void*, int, int);
typedef int(*tfn_dgram_socket_sub_timeout) (void*, void*, int, int, int, int);
typedef tfn_dgram_socket_sub tfn_dgram_socket_sub_nowait;
/**
 * 发布主题
 * @topic 主题
@@ -207,6 +217,8 @@
 * @port 总线端口
 */
typedef int(*tfn_dgram_socket_pub) (void*, void*, int, void*, int, int);
typedef int(*tfn_dgram_socket_pub_timeout) (void*, void*, int, void*, int, int, int, int);
typedef tfn_dgram_socket_pub tfn_dgram_socket_pub_nowait;
/**
 * 获取soket端口号
 */