PROTON-1036: c++: added select_broker to example documentation.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/cfd73cd0 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/cfd73cd0 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/cfd73cd0 Branch: refs/heads/go1 Commit: cfd73cd073975dcdcf9c7a8ac076a7d6f68a9df6 Parents: 193a7dd Author: Alan Conway <[email protected]> Authored: Mon Nov 2 18:33:44 2015 -0500 Committer: Alan Conway <[email protected]> Committed: Mon Nov 2 18:33:44 2015 -0500 ---------------------------------------------------------------------- examples/cpp/README.hpp | 38 ++++++++++++++++++++++------ proton-c/bindings/cpp/docs/tutorial.hpp | 10 ++++---- 2 files changed, 35 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cfd73cd0/examples/cpp/README.hpp ---------------------------------------------------------------------- diff --git a/examples/cpp/README.hpp b/examples/cpp/README.hpp index d2a51eb..64ff2da 100644 --- a/examples/cpp/README.hpp +++ b/examples/cpp/README.hpp @@ -9,14 +9,6 @@ // DEVELOPER NOTE: if you are adding or modifying examples you should keep this // file and ../proton-c/bindings/cpp/docs/tutorial.hpp up to date. -/** \example broker.cpp - -A very simple "mini broker". You can use this to run other examples that reqiure -an intermediary, or you can use any AMQP 1.0 broker. This broker creates queues -automatically when a client tries to send or subscribe. - -*/ - /** \example helloworld.cpp Basic example that connects to an intermediary on 127.0.0.1:5672, @@ -118,3 +110,33 @@ A variant of the client part, that uses a blocking/synchronous style instead of the reactive/asynchronous style. */ + +/** \example broker.hpp + +Common logic for a simple "mini broker" that creates creates queues +automatically when a client tries to send or subscribe. This file contains +the `queue` class that queues messages and the `broker_handler` class +that manages queues and links and transfers messages to/from clients. + +There are several broker programs all using the same logic but illustrating +different ways to run a server application. + +*/ + +/** \example broker.cpp + +A simple, single-threaded broker using the `proton::container`. You can use this +to run other examples that reqiure an intermediary, or you can use any AMQP 1.0 +broker. This broker creates queues automatically when a client tries to send or +subscribe. + +*/ + +/** \example select_broker.cpp + +A simple, single-threaded, select-based broker using the `proton::engine`. This +broker implementation uses the standard `select` call as an illustration of +how to integrate proton with an external IO "framework", instead of letting +the `proton::container` manage IO. + +*/ http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cfd73cd0/proton-c/bindings/cpp/docs/tutorial.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/docs/tutorial.hpp b/proton-c/bindings/cpp/docs/tutorial.hpp index bc5b758..ca8a150 100644 --- a/proton-c/bindings/cpp/docs/tutorial.hpp +++ b/proton-c/bindings/cpp/docs/tutorial.hpp @@ -10,9 +10,9 @@ messaging applications in incremental steps. There are further examples, in addition the ones mentioned in the tutorial. Some of the examples require an AMQP *broker* that can receive, store and send -messages. \ref broker.cpp is a simple example broker. Run without arguments it -listens on `0.0.0.0:5672`, the standard AMQP port on all network interfaces. To -use a different port or network interface: +messages. \ref broker.hpp and \ref broker.cpp define a simple example +broker. Run without arguments it listens on `0.0.0.0:5672`, the standard AMQP +port on all network interfaces. To use a different port or network interface: broker -a <host>:<port> @@ -291,8 +291,8 @@ To try this modified sender, run the original \ref simple_recv.cpp against it. The symmetry in the underlying AMQP that enables this is quite unique and elegant, and in reflecting this the proton API provides a flexible toolkit for -implementing all sorts of interesting intermediaries (\ref broker.cpp provided -as a simple broker for testing purposes is an example of this). +implementing all sorts of interesting intermediaries (\ref broker.hpp and \ref +broker.cpp provide a simple broker for testing purposes is an example of this). Request/Response ---------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
