X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fpoll.h;h=f149c2314e0fb3637881fa3cbfa098e29e62d35c;hp=f617bdda0d162e5e4ea911e10d11cf0437f70881;hb=3b792849c676d96918850e2f1e0af87a75278501;hpb=dbf148183e1370d5b62e15abb8b24292a3009124 diff --git a/include/yaz/poll.h b/include/yaz/poll.h index f617bdd..f149c23 100644 --- a/include/yaz/poll.h +++ b/include/yaz/poll.h @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: poll.h,v 1.2 2007-11-09 19:00:08 adam Exp $ */ +/* $Id: poll.h,v 1.3 2007-11-09 22:08:14 adam Exp $ */ /** * \file @@ -58,30 +58,11 @@ struct yaz_poll_fd { void *client_data; }; -/** \brief socket poll wrapper using select - \param fds array of sockets to be polled - \param num_fds size of fds array (number of sockets) - \param timeout number of seconds to wait (-1 for no timeout) - \retval -1 error - \retval 0 timeout - \retval >0 event occur on one or more sockets -*/ -int yaz_poll_select(struct yaz_poll_fd *fds, int num_fds, int timeout); - -/** \brief socket poll using poll - \param fds array of sockets to be polled - \param num_fds size of fds array (number of sockets) - \param timeout number of seconds to wait (-1 for no timeout) - \retval -1 error - \retval 0 timeout - \retval >0 event occur on one or more sockets -*/ -int yaz_poll_poll(struct yaz_poll_fd *fds, int num_fds, int timeout); - /** \brief poll wrapper for poll or select \param fds array of sockets to be polled \param num_fds size of fds array (number of sockets) - \param timeout number of seconds to wait (-1 for no timeout) + \param sec number of seconds to wait (-1 for no timeout) + \param nsec nano seconds to wait \retval -1 error \retval 0 timeout \retval >0 event occur on one or more sockets @@ -89,7 +70,7 @@ int yaz_poll_poll(struct yaz_poll_fd *fds, int num_fds, int timeout); This functions calls yaz_poll_poll on systems where poll is available and yaz_poll_select where it it unavailable. */ -int yaz_poll(struct yaz_poll_fd *fds, int num_fds, int timeout); +int yaz_poll(struct yaz_poll_fd *fds, int num_fds, int sec, int nsec); YAZ_END_CDECL