Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
f49b77ee
Commit
f49b77ee
authored
Sep 20, 2010
by
Martin Lucina
Committed by
Martin Sustrik
Sep 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zmq_poll honours ZMQ_FORCE_POLL and ZMQ_FORCE_SELECT options
parent
1abfc92d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
zmq.cpp
src/zmq.cpp
+21
-4
No files found.
src/zmq.cpp
View file @
f49b77ee
...
@@ -365,13 +365,23 @@ int zmq_recv (void *s_, zmq_msg_t *msg_, int flags_)
...
@@ -365,13 +365,23 @@ int zmq_recv (void *s_, zmq_msg_t *msg_, int flags_)
return
(((
zmq
::
socket_base_t
*
)
s_
)
->
recv
(
msg_
,
flags_
));
return
(((
zmq
::
socket_base_t
*
)
s_
)
->
recv
(
msg_
,
flags_
));
}
}
int
zmq_poll
(
zmq_pollitem_t
*
items_
,
int
nitems_
,
long
timeout_
)
#if defined ZMQ_FORCE_SELECT
{
#define ZMQ_POLL_BASED_ON_SELECT
#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
#elif defined ZMQ_FORCE_POLL
#define ZMQ_POLL_BASED_ON_POLL
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
defined ZMQ_HAVE_NETBSD
defined ZMQ_HAVE_NETBSD
#define ZMQ_POLL_BASED_ON_POLL
#elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
#define ZMQ_POLL_BASED_ON_SELECT
#endif
int
zmq_poll
(
zmq_pollitem_t
*
items_
,
int
nitems_
,
long
timeout_
)
{
#if defined ZMQ_POLL_BASED_ON_POLL
if
(
!
items_
)
{
if
(
!
items_
)
{
errno
=
EFAULT
;
errno
=
EFAULT
;
...
@@ -480,7 +490,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
...
@@ -480,7 +490,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
free
(
pollfds
);
free
(
pollfds
);
return
nevents
;
return
nevents
;
#elif defined ZMQ_
HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
#elif defined ZMQ_
POLL_BASED_ON_SELECT
fd_set
pollset_in
;
fd_set
pollset_in
;
FD_ZERO
(
&
pollset_in
);
FD_ZERO
(
&
pollset_in
);
...
@@ -620,6 +630,13 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
...
@@ -620,6 +630,13 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
#endif
#endif
}
}
#if defined ZMQ_POLL_BASED_ON_SELECT
#undef ZMQ_POLL_BASED_ON_SELECT
#endif
#if defined ZMQ_POLL_BASED_ON_POLL
#undef ZMQ_POLL_BASED_ON_POLL
#endif
int
zmq_errno
()
int
zmq_errno
()
{
{
return
errno
;
return
errno
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment