diff --git a/src/guacd/move-fd.h b/src/guacd/move-fd.h index aed40993..8925db08 100644 --- a/src/guacd/move-fd.h +++ b/src/guacd/move-fd.h @@ -26,16 +26,35 @@ #include "config.h" /** - * Sends the given file descriptor along the given socket. The file descriptor - * must have been sent via guacd_recv_fd. Returns non-zero on success, zero on - * error. If an error does occur, errno will be set appropriately. + * Sends the given file descriptor along the given socket, allowing the + * receiving process to use that file descriptor normally. Returns non-zero on + * success, zero on error, just as a normal call to sendmsg() would. If an + * error does occur, errno will be set appropriately. + * + * @param sock + * The file descriptor of an open UNIX domain socket along which the file + * descriptor specified by fd should be sent. + * + * @param fd + * The file descriptor to send along the given UNIX domain socket. + * + * @return + * Non-zero if the send operation succeeded, zero on error. */ int guacd_send_fd(int sock, int fd); /** * Waits for a file descriptor on the given socket, returning the received file - * descriptor. If an error occurs, -1 is returned, and errno will be set - * appropriately. + * descriptor. The file descriptor must have been sent via guacd_send_fd. If an + * error occurs, -1 is returned, and errno will be set appropriately. + * + * @param sock + * The file descriptor of an open UNIX domain socket along which the file + * descriptor will be sent (by guacd_send_fd()). + * + * @return + * The received file descriptor, or -1 if an error occurs preventing + * receipt of the file descriptor. */ int guacd_recv_fd(int sock);