From 1e8fe45995e221e014fd95af3df040f54b56f19c Mon Sep 17 00:00:00 2001 From: Kristian Evensen Date: Fri, 5 Apr 2013 17:32:53 +0200 Subject: [PATCH] include: updated uv_udp_open documentation On Unix, uv_udp_open can be used with any socket as long as the socket follows the datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(), etc.). This means that any datagram-socket, like for example netlink or raw sockets, can be used with libuv. Added this information to the documentation. --- include/uv.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uv.h b/include/uv.h index 52808fac..a6688131 100644 --- a/include/uv.h +++ b/include/uv.h @@ -787,6 +787,12 @@ UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle); /* * Opens an existing file descriptor or SOCKET as a udp handle. + * + * Unix only: + * The only requirement of the sock argument is that it follows the + * datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(), + * etc.). In other words, other datagram-type sockets like raw sockets or + * netlink sockets can also be passed to this function. */ UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock);