Skip to content

Commit

Permalink
Fixed use of pollset, added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hintjens committed Sep 21, 2010
1 parent 7a420ba commit 45aac8a
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/C++/lruqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main (int argc, char *argv[])
while (1) {

// Initialize poll set
zmq::pollitem_t items [2] = {
zmq::pollitem_t items [] = {
// Always poll for worker activity on backend
{ backend, 0, ZMQ_POLLIN, 0 },
// Poll front-end only if we have available workers
Expand Down
13 changes: 13 additions & 0 deletions examples/C++/lruqueue2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No-one has translated the lruqueue2 example into C++ yet. Be the first to create
lruqueue2 in C++ and get one free Internet! If you're the author of the C++
binding, this is a great way to get people to use 0MQ in C++.
To submit a new translation email it to 1000 4 20 24 25 29 30 44 46 107 109 114 121 1000EMAIL). Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
2 changes: 1 addition & 1 deletion examples/C++/mspoller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main (int argc, char *argv[])
subscriber.setsockopt(ZMQ_SUBSCRIBE, "10001 ", 6);

// Initialize poll set
zmq::pollitem_t items [2] = {
zmq::pollitem_t items [] = {
{ receiver, 0, ZMQ_POLLIN, 0 },
{ subscriber, 0, ZMQ_POLLIN, 0 }
};
Expand Down
13 changes: 13 additions & 0 deletions examples/C++/peering1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No-one has translated the peering1 example into C++ yet. Be the first to create
peering1 in C++ and get one free Internet! If you're the author of the C++
binding, this is a great way to get people to use 0MQ in C++.
To submit a new translation email it to 1000 4 20 24 25 29 30 44 46 107 109 114 121 1000EMAIL). Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
13 changes: 13 additions & 0 deletions examples/C++/peering2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No-one has translated the peering2 example into C++ yet. Be the first to create
peering2 in C++ and get one free Internet! If you're the author of the C++
binding, this is a great way to get people to use 0MQ in C++.
To submit a new translation email it to 1000 4 20 24 25 29 30 44 46 107 109 114 121 1000EMAIL). Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
2 changes: 1 addition & 1 deletion examples/C++/rrbroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main (int argc, char *argv[])
backend.bind("tcp://*:5560");

// Initialize poll set
zmq::pollitem_t items [2] = {
zmq::pollitem_t items [] = {
{ frontend, 0, ZMQ_POLLIN, 0 },
{ backend, 0, ZMQ_POLLIN, 0 }
};
Expand Down
13 changes: 13 additions & 0 deletions examples/C++/rtrouter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No-one has translated the rtrouter example into C++ yet. Be the first to create
rtrouter in C++ and get one free Internet! If you're the author of the C++
binding, this is a great way to get people to use 0MQ in C++.
To submit a new translation email it to 1000 4 20 24 25 29 30 44 46 107 109 114 121 1000EMAIL). Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
2 changes: 1 addition & 1 deletion examples/C++/taskwork2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main (int argc, char *argv[])
controller.setsockopt(ZMQ_SUBSCRIBE, "", 0);

// Process messages from receiver and controller
zmq::pollitem_t items [2] = {
zmq::pollitem_t items [] = {
{ receiver, 0, ZMQ_POLLIN, 0 },
{ controller, 0, ZMQ_POLLIN, 0 }
};
Expand Down
13 changes: 13 additions & 0 deletions examples/C++/zmsg.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No-one has translated the zmsg example into C++ yet. Be the first to create
zmsg in C++ and get one free Internet! If you're the author of the C++
binding, this is a great way to get people to use 0MQ in C++.
To submit a new translation email it to 1000 4 20 24 25 29 30 44 46 107 109 114 121 1000EMAIL). Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
13 changes: 13 additions & 0 deletions examples/C++/zmsg_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
No-one has translated the zmsg_test example into C++ yet. Be the first to create
zmsg_test in C++ and get one free Internet! If you're the author of the C++
binding, this is a great way to get people to use 0MQ in C++.
To submit a new translation email it to 1000 4 20 24 25 29 30 44 46 107 109 114 121 1000EMAIL). Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.

0 comments on commit 45aac8a

Please sign in to comment.