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
415bdbc1
Commit
415bdbc1
authored
Jul 31, 2017
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: ZMQ_BINDTODEVICE is DRAFT but not DRAFT
Solution: move definition in the DRAFT section of the header
parent
2048ed5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
zmq.h
include/zmq.h
+3
-1
zmq_draft.h
src/zmq_draft.h
+3
-0
test_setsockopt.cpp
tests/test_setsockopt.cpp
+3
-1
No files found.
include/zmq.h
View file @
415bdbc1
...
...
@@ -368,7 +368,6 @@ ZMQ_EXPORT const char *zmq_msg_gets (const zmq_msg_t *msg, const char *property)
#define ZMQ_VMCI_BUFFER_MAX_SIZE 87
#define ZMQ_VMCI_CONNECT_TIMEOUT 88
#define ZMQ_USE_FD 89
#define ZMQ_BINDTODEVICE 90
/* Message options */
#define ZMQ_MORE 1
...
...
@@ -562,6 +561,9 @@ ZMQ_EXPORT void zmq_threadclose (void* thread);
#define ZMQ_SCATTER 17
#define ZMQ_DGRAM 18
/* DRAFT Socket options. */
#define ZMQ_BINDTODEVICE 90
/* DRAFT 0MQ socket events and monitoring */
#define ZMQ_EVENT_HANDSHAKE_FAILED 0x0800
#define ZMQ_EVENT_HANDSHAKE_SUCCEED 0x1000
...
...
src/zmq_draft.h
View file @
415bdbc1
...
...
@@ -46,6 +46,9 @@
#define ZMQ_SCATTER 17
#define ZMQ_DGRAM 18
/* DRAFT Socket options. */
#define ZMQ_BINDTODEVICE 90
/* DRAFT 0MQ socket events and monitoring */
#define ZMQ_EVENT_HANDSHAKE_FAILED 0x0800
#define ZMQ_EVENT_HANDSHAKE_SUCCEED 0x1000
...
...
tests/test_setsockopt.cpp
View file @
415bdbc1
...
...
@@ -113,10 +113,11 @@ void test_setsockopt_use_fd ()
#define BOUNDDEVBUFSZ 16
void
test_setsockopt_bindtodevice
()
{
int
rc
;
void
*
ctx
=
zmq_ctx_new
();
void
*
socket
=
zmq_socket
(
ctx
,
ZMQ_PUSH
);
#ifdef ZMQ_BINDTODEVICE
int
rc
;
char
devname
[
BOUNDDEVBUFSZ
];
size_t
buflen
=
BOUNDDEVBUFSZ
;
...
...
@@ -137,6 +138,7 @@ void test_setsockopt_bindtodevice ()
rc
=
zmq_getsockopt
(
socket
,
ZMQ_BINDTODEVICE
,
devname
,
&
buflen
);
assert
(
rc
==
0
);
assert
(
!
strncmp
(
"testdev"
,
devname
,
buflen
));
#endif
zmq_close
(
socket
);
zmq_ctx_term
(
ctx
);
...
...
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