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
6647e612
Commit
6647e612
authored
Sep 04, 2010
by
Martin Lucina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Small improvements to zmq_device(3) page"
This reverts commit
96bcc9e6
.
parent
83d253d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
zmq_device.txt
doc/zmq_device.txt
+10
-22
No files found.
doc/zmq_device.txt
View file @
6647e612
...
...
@@ -31,13 +31,16 @@ Before calling _zmq_device()_ you must set any socket options, and connect or
bind both frontend and backend sockets. The two conventional device models
are:
* proxy model - accept inward connections to frontend socket (by binding it to
an endpoint), and make onward connections through backend socket (connecting
to endpoints on other nodes). A proxy device model can fit well into an
existing topology.
* broker model - accept connections on both frontend and backend sockets (by
binding both to endpoints). A broker device model creates a star topology
where nodes can come and go at any time.
*proxy*::
bind frontend socket to an endpoint, and connect backend socket to
downstream components. A proxy device model does not require changes to
the downstream topology but that topology is static (any changes require
reconfiguring the device).
*broker*::
bind frontend socket to one endpoint and bind backend socket to a second
endpoint. Downstream components must now connect into the device. A
broker device model allows a dynamic downstream topology (components can
come and go at any time).
_zmq_device()_ runs in the current thread and returns only if/when the current
context is closed.
...
...
@@ -118,21 +121,6 @@ assert (zmq_bind (backend, "tcp://*:5556") == 0);
zmq_device (ZMQ_QUEUE, frontend, backend);
----
.Creating a pubsub proxy
----
// Create frontend and backend sockets
void *frontend = zmq_socket (context, ZMQ_SUB);
assert (backend);
void *backend = zmq_socket (context, ZMQ_PUB);
assert (frontend);
// Connect frontend to publisher
assert (zmq_bind (frontend, "tcp://192.68.55.112:4444") == 0);
// Bind backend to TCP port
assert (zmq_bind (backend, "tcp://*:5556") == 0);
// Start a forwarder device
zmq_device (ZMQ_FORWARDER, frontend, backend);
----
SEE ALSO
--------
...
...
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