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
5da97127
Commit
5da97127
authored
Nov 06, 2012
by
Ian Barber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #460 from hintjens/master
Renamed ZMQ_ROUTER_RAW_SOCK to ZMQ_ROUTER_RAW
parents
80aef8df
777c38ae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
zmq_setsockopt.txt
doc/zmq_setsockopt.txt
+17
-0
zmq.h
include/zmq.h
+1
-1
router.cpp
src/router.cpp
+2
-2
test_raw_sock.cpp
tests/test_raw_sock.cpp
+1
-1
No files found.
doc/zmq_setsockopt.txt
View file @
5da97127
...
...
@@ -381,6 +381,23 @@ Default value:: 0
Applicable socket types:: ZMQ_ROUTER
ZMQ_ROUTER_RAW: switch ROUTER socket to raw mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets the raw mode on the 'ROUTER', when set to 1. When the ROUTER socket is in
raw mode, and when using the tcp:// transport, it will read and write TCP data
without 0MQ framing. This lets 0MQ applications talk to non-0MQ applications.
When using raw mode, you cannot set explicit identities, and the ZMQ_MSGMORE
flag is ignored when sending data messages. In raw mode you can close a specific
connection by sending it a zero-length message (following the identity frame).
[horizontal]
Option value type:: int
Option value unit:: 0, 1
Default value:: 0
Applicable socket types:: ZMQ_ROUTER
ZMQ_XPUB_VERBOSE: provide all subscription messages on XPUB sockets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
include/zmq.h
View file @
5da97127
...
...
@@ -250,7 +250,7 @@ ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, int optval);
#define ZMQ_TCP_ACCEPT_FILTER 38
#define ZMQ_DELAY_ATTACH_ON_CONNECT 39
#define ZMQ_XPUB_VERBOSE 40
#define ZMQ_ROUTER_RAW
_SOCK
41
#define ZMQ_ROUTER_RAW 41
/* Message options */
...
...
src/router.cpp
View file @
5da97127
...
...
@@ -79,7 +79,7 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_,
size_t
optvallen_
)
{
if
(
option_
!=
ZMQ_ROUTER_MANDATORY
&&
option_
!=
ZMQ_ROUTER_RAW
_SOCK
)
{
&&
option_
!=
ZMQ_ROUTER_RAW
)
{
errno
=
EINVAL
;
return
-
1
;
}
...
...
@@ -87,7 +87,7 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_,
errno
=
EINVAL
;
return
-
1
;
}
if
(
option_
==
ZMQ_ROUTER_RAW
_SOCK
)
{
if
(
option_
==
ZMQ_ROUTER_RAW
)
{
raw_sock
=
*
static_cast
<
const
int
*>
(
optval_
);
if
(
raw_sock
)
{
options
.
recv_identity
=
false
;
...
...
tests/test_raw_sock.cpp
View file @
5da97127
...
...
@@ -110,7 +110,7 @@ int main ()
assert
(
sb
);
int
raw_sock
=
1
;
int
rc
=
zmq_setsockopt
(
sb
,
ZMQ_ROUTER_RAW
_SOCK
,
&
raw_sock
,
sizeof
raw_sock
);
int
rc
=
zmq_setsockopt
(
sb
,
ZMQ_ROUTER_RAW
,
&
raw_sock
,
sizeof
raw_sock
);
assert
(
rc
==
0
);
rc
=
zmq_bind
(
sb
,
"tcp://127.0.0.1:5555"
);
assert
(
rc
==
0
);
...
...
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