projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Return fixed hit count 24 for anything but RPN
[yaz-moved-to-github.git]
/
include
/
yaz
/
poll.h
diff --git
a/include/yaz/poll.h
b/include/yaz/poll.h
index
7edc317
..
bfecdbd
100644
(file)
--- a/
include/yaz/poll.h
+++ b/
include/yaz/poll.h
@@
-1,5
+1,5
@@
-/*
- * Copyright (c) 1995-2007, Index Data
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data.
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@
-24,7
+24,6
@@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
* (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.1 2007-11-09 16:46:43 adam Exp $ */
/**
* \file
/**
* \file
@@
-40,6
+39,7
@@
YAZ_BEGIN_CDECL
/** \brief select/poll masks .. timeout is "output" only */
enum yaz_poll_mask {
/** \brief select/poll masks .. timeout is "output" only */
enum yaz_poll_mask {
+ yaz_poll_none = 0,
yaz_poll_read = 1,
yaz_poll_write = 2,
yaz_poll_except = 4,
yaz_poll_read = 1,
yaz_poll_write = 2,
yaz_poll_except = 4,
@@
-58,26
+58,29
@@
struct yaz_poll_fd {
void *client_data;
};
void *client_data;
};
-/** \brief socket poll wrapper using select
- */
-int yaz_poll_select(struct yaz_poll_fd *fds, int num_fds, int timeout);
-
-/** \brief socket poll using poll */
-int yaz_poll_poll(struct yaz_poll_fd *fds, int num_fds, int timeout);
-
/** \brief poll wrapper for poll or select
/** \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 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
+
This functions calls yaz_poll_poll on systems where poll is
available and yaz_poll_select where it it unavailable.
*/
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);
+YAZ_EXPORT
+int yaz_poll(struct yaz_poll_fd *fds, int num_fds, int sec, int nsec);
+#define yaz_poll_add(var,value) var = (enum yaz_poll_mask ) ((int) var | value)
YAZ_END_CDECL
#endif
/*
* Local variables:
* c-basic-offset: 4
YAZ_END_CDECL
#endif
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab