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
e33a382f
Commit
e33a382f
authored
Oct 18, 2013
by
Laurent Alebarde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new zmq_proxy is zmq_proxy_steerable to respect C API
parent
1b75d1ec
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
zmq.h
include/zmq.h
+2
-1
zmq.cpp
src/zmq.cpp
+13
-1
test_proxy.cpp
tests/test_proxy.cpp
+1
-1
No files found.
include/zmq.h
View file @
e33a382f
...
...
@@ -395,7 +395,8 @@ ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
/* Built-in message proxy (3-way) */
ZMQ_EXPORT
int
zmq_proxy
(
void
*
frontend
,
void
*
backend
,
void
*
capture
,
void
*
control
);
ZMQ_EXPORT
int
zmq_proxy
(
void
*
frontend
,
void
*
backend
,
void
*
capture
);
ZMQ_EXPORT
int
zmq_proxy_steerable
(
void
*
frontend
,
void
*
backend
,
void
*
capture
,
void
*
control
);
/* Encode a binary key as printable text using ZMQ RFC 32 */
ZMQ_EXPORT
char
*
zmq_z85_encode
(
char
*
dest
,
uint8_t
*
data
,
size_t
size
);
...
...
src/zmq.cpp
View file @
e33a382f
...
...
@@ -1016,7 +1016,19 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
// The proxy functionality
int
zmq_proxy
(
void
*
frontend_
,
void
*
backend_
,
void
*
capture_
,
void
*
control_
)
int
zmq_proxy
(
void
*
frontend_
,
void
*
backend_
,
void
*
capture_
)
{
if
(
!
frontend_
||
!
backend_
)
{
errno
=
EFAULT
;
return
-
1
;
}
return
zmq
::
proxy
(
(
zmq
::
socket_base_t
*
)
frontend_
,
(
zmq
::
socket_base_t
*
)
backend_
,
(
zmq
::
socket_base_t
*
)
capture_
);
}
int
zmq_proxy_steerable
(
void
*
frontend_
,
void
*
backend_
,
void
*
capture_
,
void
*
control_
)
{
if
(
!
frontend_
||
!
backend_
)
{
errno
=
EFAULT
;
...
...
tests/test_proxy.cpp
View file @
e33a382f
...
...
@@ -149,7 +149,7 @@ server_task (void *ctx)
threads
[
thread_nbr
]
=
zmq_threadstart
(
&
server_worker
,
ctx
);
// Connect backend to frontend via a proxy
zmq_proxy
(
frontend
,
backend
,
NULL
,
control
);
zmq_proxy
_steerable
(
frontend
,
backend
,
NULL
,
control
);
for
(
thread_nbr
=
0
;
thread_nbr
<
QT_WORKERS
;
thread_nbr
++
)
zmq_threadclose
(
threads
[
thread_nbr
]);
...
...
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