From 2932bd287383151f9e469d90c6de2bcee6276175 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 6 Aug 2005 00:11:27 +0000 Subject: * Elaborate documentation about asyncns_getnext() and asyncns_wait() a little, suggestion from Paul LeoNerd Evans git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@21 cc0fb855-19ed-0310-866e-8c1d96e4abae --- libasyncns/asyncns.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libasyncns/asyncns.h b/libasyncns/asyncns.h index 2c9ebb8..2bf4e62 100644 --- a/libasyncns/asyncns.h +++ b/libasyncns/asyncns.h @@ -66,9 +66,11 @@ void asyncns_free(asyncns_t *asyncns); * loop. */ int asyncns_fd(asyncns_t *asyncns); -/** Process pending responses. If block is non-zero wait until at - * least one response has been processed. If block is zero, process - * all pending responses and return. */ +/** Process pending responses. After this function is called you can + * get the next completed query object(s) using asyncns_getnext(). If + * block is non-zero wait until at least one response has been + * processed. If block is zero, process all pending responses and + * return. */ int asyncns_wait(asyncns_t *asyncns, int block); /** Issue a name to address query on the specified session. The @@ -102,7 +104,9 @@ asyncns_query_t* asyncns_getnameinfo(asyncns_t *asyncns, const struct sockaddr * * returned. */ int asyncns_getnameinfo_done(asyncns_t *asyncns, asyncns_query_t* q, char *ret_host, size_t hostlen, char *ret_serv, size_t servlen); -/** Return the next completed query object. If no query has been completed yet, return NULL */ +/** Return the next completed query object. If no query has been + * completed yet, return NULL. Please note that you need to run + * asyncns_wait() before this function will return sensible data. */ asyncns_query_t* asyncns_getnext(asyncns_t *asyncns); /** Return the number of query objects (completed or not) attached to this session */ -- cgit