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
73896808
Commit
73896808
authored
May 02, 2016
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: zmq_poller* are not yet stable APIs
Solution: mark them as DRAFT APIs
parent
7e700f1e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
42 deletions
+80
-42
Makefile.am
Makefile.am
+5
-5
zmq.h
include/zmq.h
+35
-36
precompiled.hpp
src/precompiled.hpp
+39
-0
CMakeLists.txt
tests/CMakeLists.txt
+1
-1
No files found.
Makefile.am
View file @
73896808
...
...
@@ -394,7 +394,6 @@ test_apps = \
tests/test_sockopt_hwm
\
tests/test_heartbeats
\
tests/test_stream_exceeds_buffer
\
tests/test_poller
\
tests/test_timers
\
tests/test_radio_dish
\
tests/test_udp
\
...
...
@@ -598,9 +597,6 @@ tests_test_heartbeats_LDADD = src/libzmq.la
tests_test_stream_exceeds_buffer_SOURCES
=
tests/test_stream_exceeds_buffer.cpp
tests_test_stream_exceeds_buffer_LDADD
=
src/libzmq.la
tests_test_poller_SOURCES
=
tests/test_poller.cpp
tests_test_poller_LDADD
=
src/libzmq.la
tests_test_timers_SOURCES
=
tests/test_timers.cpp
tests_test_timers_LDADD
=
src/libzmq.la
...
...
@@ -733,9 +729,13 @@ test_reqrep_vmci_CXXFLAGS = @LIBZMQ_VMCI_CXXFLAGS@
endif
if
ENABLE_DRAFTS
test_apps
+=
tests/test_client_server
\
test_apps
+=
tests/test_poller
\
tests/test_client_server
\
tests/test_thread_safe
tests_test_poller_SOURCES
=
tests/test_poller.cpp
tests_test_poller_LDADD
=
src/libzmq.la
tests_test_client_server_SOURCES
=
tests/test_client_server.cpp
tests_test_client_server_LDADD
=
src/libzmq.la
...
...
include/zmq.h
View file @
73896808
...
...
@@ -438,42 +438,6 @@ typedef struct zmq_pollitem_t
ZMQ_EXPORT
int
zmq_poll
(
zmq_pollitem_t
*
items
,
int
nitems
,
long
timeout
);
/******************************************************************************/
/* Poller polling on sockets,fd and thread-safe sockets */
/******************************************************************************/
#define ZMQ_HAVE_POLLER
typedef
struct
zmq_poller_event_t
{
void
*
socket
;
#if defined _WIN32
SOCKET
fd
;
#else
int
fd
;
#endif
void
*
user_data
;
short
events
;
}
zmq_poller_event_t
;
ZMQ_EXPORT
void
*
zmq_poller_new
(
void
);
ZMQ_EXPORT
int
zmq_poller_destroy
(
void
**
poller_p
);
ZMQ_EXPORT
int
zmq_poller_add
(
void
*
poller
,
void
*
socket
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify
(
void
*
poller
,
void
*
socket
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove
(
void
*
poller
,
void
*
socket
);
ZMQ_EXPORT
int
zmq_poller_wait
(
void
*
poller
,
zmq_poller_event_t
*
event
,
long
timeout
);
#if defined _WIN32
ZMQ_EXPORT
int
zmq_poller_add_fd
(
void
*
poller
,
SOCKET
fd
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify_fd
(
void
*
poller
,
SOCKET
fd
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove_fd
(
void
*
poller
,
SOCKET
fd
);
#else
ZMQ_EXPORT
int
zmq_poller_add_fd
(
void
*
poller
,
int
fd
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify_fd
(
void
*
poller
,
int
fd
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove_fd
(
void
*
poller
,
int
fd
);
#endif
/******************************************************************************/
/* Scheduling timers */
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
...
...
@@ -584,6 +548,41 @@ ZMQ_EXPORT void zmq_threadclose (void* thread);
#define ZMQ_SERVER 12
#define ZMQ_CLIENT 13
/******************************************************************************/
/* Poller polling on sockets,fd and thread-safe sockets */
/******************************************************************************/
#define ZMQ_HAVE_POLLER
typedef
struct
zmq_poller_event_t
{
void
*
socket
;
#if defined _WIN32
SOCKET
fd
;
#else
int
fd
;
#endif
void
*
user_data
;
short
events
;
}
zmq_poller_event_t
;
ZMQ_EXPORT
void
*
zmq_poller_new
(
void
);
ZMQ_EXPORT
int
zmq_poller_destroy
(
void
**
poller_p
);
ZMQ_EXPORT
int
zmq_poller_add
(
void
*
poller
,
void
*
socket
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify
(
void
*
poller
,
void
*
socket
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove
(
void
*
poller
,
void
*
socket
);
ZMQ_EXPORT
int
zmq_poller_wait
(
void
*
poller
,
zmq_poller_event_t
*
event
,
long
timeout
);
#if defined _WIN32
ZMQ_EXPORT
int
zmq_poller_add_fd
(
void
*
poller
,
SOCKET
fd
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify_fd
(
void
*
poller
,
SOCKET
fd
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove_fd
(
void
*
poller
,
SOCKET
fd
);
#else
ZMQ_EXPORT
int
zmq_poller_add_fd
(
void
*
poller
,
int
fd
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify_fd
(
void
*
poller
,
int
fd
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove_fd
(
void
*
poller
,
int
fd
);
#endif
#endif // ZMQ_BUILD_DRAFT_API
...
...
src/precompiled.hpp
View file @
73896808
...
...
@@ -156,6 +156,45 @@
#define ZMQ_SERVER 12
#define ZMQ_CLIENT 13
/* DRAFT Socket events. */
int
zmq_join
(
void
*
s
,
const
char
*
group
);
int
zmq_leave
(
void
*
s
,
const
char
*
group
);
/******************************************************************************/
/* Poller polling on sockets,fd and thread-safe sockets */
/******************************************************************************/
#define ZMQ_HAVE_POLLER
typedef
struct
zmq_poller_event_t
{
void
*
socket
;
#if defined _WIN32
SOCKET
fd
;
#else
int
fd
;
#endif
void
*
user_data
;
short
events
;
}
zmq_poller_event_t
;
void
*
zmq_poller_new
(
void
);
int
zmq_poller_destroy
(
void
**
poller_p
);
int
zmq_poller_add
(
void
*
poller
,
void
*
socket
,
void
*
user_data
,
short
events
);
int
zmq_poller_modify
(
void
*
poller
,
void
*
socket
,
short
events
);
int
zmq_poller_remove
(
void
*
poller
,
void
*
socket
);
int
zmq_poller_wait
(
void
*
poller
,
zmq_poller_event_t
*
event
,
long
timeout
);
#if defined _WIN32
int
zmq_poller_add_fd
(
void
*
poller
,
SOCKET
fd
,
void
*
user_data
,
short
events
);
int
zmq_poller_modify_fd
(
void
*
poller
,
SOCKET
fd
,
short
events
);
int
zmq_poller_remove_fd
(
void
*
poller
,
SOCKET
fd
);
#else
int
zmq_poller_add_fd
(
void
*
poller
,
int
fd
,
void
*
user_data
,
short
events
);
int
zmq_poller_modify_fd
(
void
*
poller
,
int
fd
,
short
events
);
int
zmq_poller_remove_fd
(
void
*
poller
,
int
fd
);
#endif
#endif // ZMQ_BUILD_DRAFT_API
#endif //ifndef __ZMQ_PRECOMPILED_HPP_INCLUDED__
tests/CMakeLists.txt
View file @
73896808
...
...
@@ -55,7 +55,6 @@ set(tests
test_setsockopt
test_sockopt_hwm
test_heartbeats
test_poller
test_atomics
test_bind_src_address
test_capabilities
...
...
@@ -118,6 +117,7 @@ endif()
IF
(
ENABLE_DRAFTS
)
list
(
APPEND tests
test_poller
test_thread_safe
test_client_server
)
...
...
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