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
d020dd67
Commit
d020dd67
authored
Aug 17, 2013
by
danielkr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Declare ZMQ_CONFLATE option
parent
4eac7e3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
zmq.h
include/zmq.h
+1
-0
options.cpp
src/options.cpp
+20
-1
options.hpp
src/options.hpp
+6
-0
No files found.
include/zmq.h
View file @
d020dd67
...
...
@@ -278,6 +278,7 @@ ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, int optval);
#define ZMQ_PROBE_ROUTER 51
#define ZMQ_REQ_REQUEST_IDS 52
#define ZMQ_REQ_STRICT 53
#define ZMQ_CONFLATE 54
/* Message options */
#define ZMQ_MORE 1
...
...
src/options.cpp
View file @
d020dd67
...
...
@@ -54,7 +54,8 @@ zmq::options_t::options_t () :
tcp_keepalive_intvl
(
-
1
),
mechanism
(
ZMQ_NULL
),
as_server
(
0
),
socket_id
(
0
)
socket_id
(
0
),
conflate
(
false
)
{
}
...
...
@@ -340,6 +341,16 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
}
break
;
# endif
case
ZMQ_CONFLATE
:
if
(
is_int
&&
(
value
==
0
||
value
==
1
))
{
conflate
=
(
value
!=
0
);
return
0
;
}
break
;
default
:
break
;
}
errno
=
EINVAL
;
return
-
1
;
...
...
@@ -596,6 +607,14 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
}
break
;
# endif
case
ZMQ_CONFLATE
:
if
(
is_int
)
{
*
value
=
conflate
;
return
0
;
}
break
;
}
errno
=
EINVAL
;
return
-
1
;
...
...
src/options.hpp
View file @
d020dd67
...
...
@@ -142,6 +142,12 @@ namespace zmq
// ID of the socket.
int
socket_id
;
// If true, socket conflates outgoing/incoming messages.
// Applicable to dealer, push/pull, pub/sub socket types.
// Cannot receive multi-part messages.
// Ignores hwm
bool
conflate
;
};
}
...
...
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