qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jr...@apache.org
Subject [02/51] [abbrv] [partial] qpid-site git commit: QPID-8154: Refresh the proton doc snapshot
Date Tue, 01 May 2018 13:44:52 GMT
http://git-wip-us.apache.org/repos/asf/qpid-site/blob/701caf21/content/releases/qpid-proton-master/proton/cpp/api/messaging__handler_8hpp_source.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-master/proton/cpp/api/messaging__handler_8hpp_source.html b/content/releases/qpid-proton-master/proton/cpp/api/messaging__handler_8hpp_source.html
index 2b808ee..1983dfd 100755
--- a/content/releases/qpid-proton-master/proton/cpp/api/messaging__handler_8hpp_source.html
+++ b/content/releases/qpid-proton-master/proton/cpp/api/messaging__handler_8hpp_source.html
@@ -93,8 +93,8 @@ $(document).ready(function(){initNavTree('messaging__handler_8hpp_source.html','
 <div class="title">messaging_handler.hpp</div>  </div>
 </div><!--header-->
 <div class="contents">
-<a href="messaging__handler_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef PROTON_MESSAGING_HANDLER_HPP</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define PROTON_MESSAGING_HANDLER_HPP</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"
 > * or more contributor license agreements.  See the NOTICE file</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * distributed with this work for additional information</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * regarding copyright ownership.  The ASF licenses this file</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * with the License.  You may obtain a copy of the License at</span></div><div class="line"><a name="l00013"></a><span class="li
 neno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * software distributed under the License is distributed on an</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * KIND, either express or impli
 ed.  See the License for the</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * specific language governing permissions and limitations</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * under the License.</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fwd_8hpp.html">./fwd.hpp</a>&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;./internal/export.hpp&quot;
 </span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceproton.html">proton</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classproton_1_1messaging__handler.html">   61</a></span>&#160;<span class="keyword">class</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;PN_CPP_CLASS_EXTERN <a class="code" href="classproton_1_1messaging__handler.html">messaging_handler</a> {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00064"></a><span class="lineno
 ">   64</span>&#160;    PN_CPP_EXTERN <a class="code" href="classproton_1_1messaging__handler.html">messaging_handler</a>();</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> ~messaging_handler();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_container_start(<a class="code" href="classproton_1_1container.html">container</a> &amp;c);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_container_stop(<a class="code" href="classproton_1_1container.html">container</a> &amp;c);</di
 v><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_message(<a class="code" href="classproton_1_1delivery.html">delivery</a> &amp;d, <a class="code" href="classproton_1_1message.html">message</a> &amp;m);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sendable(<a class="code" href="classproton_1_1sender.html">sender</a> &amp;s);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keyword
 type">void</span> on_transport_open(<a class="code" href="classproton_1_1transport.html">transport</a> &amp;t);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    </div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_transport_close(<a class="code" href="classproton_1_1transport.html">transport</a> &amp;t);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_transport_error(<a class="code" href="classproton_1_1transport.html">transport</a> &amp;t);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    
 PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_open(<a class="code" href="classproton_1_1connection.html">connection</a> &amp;c);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_close(<a class="code" href="classproton_1_1connection.html">connection</a> &amp;c);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_error(<a class="code" href="classproton_1_1connection.html">connection</a> &amp;c);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div c
 lass="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_session_open(<a class="code" href="classproton_1_1session.html">session</a> &amp;s);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_session_close(<a class="code" href="classproton_1_1session.html">session</a> &amp;s);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_session_error(<a class="code" href="classproton_1_1session.html">session</a> &amp;s);</div><div class="line"><a name="l00108"></a><s
 pan class="lineno">  108</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_open(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp; l);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_detach(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp; l);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_close(<a class="code" href="classproton_1_1receiver.html">receiver<
 /a>&amp; l);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_error(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp; l);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_open(<a class="code" href="classproton_1_1sender.html">sender</a>&amp; l);</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_detach(<a class="
 code" href="classproton_1_1sender.html">sender</a>&amp; l);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_close(<a class="code" href="classproton_1_1sender.html">sender</a>&amp; l);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_error(<a class="code" href="classproton_1_1sender.html">sender</a>&amp; l);</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtyp
 e">void</span> on_tracker_accept(<a class="code" href="classproton_1_1tracker.html">tracker</a> &amp;d);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_tracker_reject(<a class="code" href="classproton_1_1tracker.html">tracker</a> &amp;d);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_tracker_release(<a class="code" href="classproton_1_1tracker.html">tracker</a> &amp;d);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    PN_CPP_EXTERN <span 
 class="keyword">virtual</span> <span class="keywordtype">void</span> on_tracker_settle(<a class="code" href="classproton_1_1tracker.html">tracker</a> &amp;d);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_delivery_settle(<a class="code" href="classproton_1_1delivery.html">delivery</a> &amp;d);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_drain_start(<a class="code" href="classproton_1_1sender.html">sender</a> &amp;s);</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00154"></a><span
  class="lineno">  154</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_drain_finish(<a class="code" href="classproton_1_1receiver.html">receiver</a> &amp;r);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_wake(<a class="code" href="classproton_1_1connection.html">connection</a>&amp;);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_error(<span class="keyword">const</span> <a class="code" href="classproton_1_1error__condition.html">error_condition</a> &amp;c);</div><div class="line">
 <a name="l00174"></a><span class="lineno">  174</span>&#160;};</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;} <span class="comment">// proton</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="preprocessor">#endif // PROTON_MESSAGING_HANDLER_HPP</span></div><div class="ttc" id="classproton_1_1message_html"><div class="ttname"><a href="classproton_1_1message.html">proton::message</a></div><div class="ttdoc">An AMQP message. </div><div class="ttdef"><b>Definition:</b> message.hpp:50</div></div>
-<div class="ttc" id="classproton_1_1container_html"><div class="ttname"><a href="classproton_1_1container.html">proton::container</a></div><div class="ttdoc">A top-level container of connections, sessions, and links. </div><div class="ttdef"><b>Definition:</b> container.hpp:55</div></div>
+<a href="messaging__handler_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef PROTON_MESSAGING_HANDLER_HPP</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define PROTON_MESSAGING_HANDLER_HPP</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"
 > * or more contributor license agreements.  See the NOTICE file</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * distributed with this work for additional information</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * regarding copyright ownership.  The ASF licenses this file</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * with the License.  You may obtain a copy of the License at</span></div><div class="line"><a name="l00013"></a><span class="li
 neno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * software distributed under the License is distributed on an</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * KIND, either express or impli
 ed.  See the License for the</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * specific language governing permissions and limitations</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * under the License.</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fwd_8hpp.html">./fwd.hpp</a>&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;./internal/export.hpp&quot;
 </span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceproton.html">proton</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classproton_1_1messaging__handler.html">   62</a></span>&#160;<span class="keyword">class</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;PN_CPP_CLASS_EXTERN <a class="code" href="classproton_1_1messaging__handler.html">messaging_handler</a> {</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00065"></a><span class="lineno
 ">   65</span>&#160;    PN_CPP_EXTERN <a class="code" href="classproton_1_1messaging__handler.html">messaging_handler</a>();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> ~messaging_handler();</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_container_start(<a class="code" href="classproton_1_1container.html">container</a>&amp;);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_container_stop(<a class="code" href="classproton_1_1container.html">container</a>&amp;);</div><d
 iv class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_message(<a class="code" href="classproton_1_1delivery.html">delivery</a>&amp;, <a class="code" href="classproton_1_1message.html">message</a>&amp;);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sendable(<a class="code" href="classproton_1_1sender.html">sender</a>&amp;);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void
 </span> on_transport_open(<a class="code" href="classproton_1_1transport.html">transport</a>&amp;);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_transport_close(<a class="code" href="classproton_1_1transport.html">transport</a>&amp;);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_transport_error(<a class="code" href="classproton_1_1transport.html">transport</a>&amp;);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    PN_CPP_EXTERN <span 
 class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_open(<a class="code" href="classproton_1_1connection.html">connection</a>&amp;);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_close(<a class="code" href="classproton_1_1connection.html">connection</a>&amp;);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_error(<a class="code" href="classproton_1_1connection.html">connection</a>&amp;);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l0010
 6"></a><span class="lineno">  106</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_session_open(<a class="code" href="classproton_1_1session.html">session</a>&amp;);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_session_close(<a class="code" href="classproton_1_1session.html">session</a>&amp;);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_session_error(<a class="code" href="classproton_1_1session.html">session</a>&amp;);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&
 #160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_open(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp;);</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_detach(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp;);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_close(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp;);</div><div class="line"><a
  name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_error(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp;);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_open(<a class="code" href="classproton_1_1sender.html">sender</a>&amp;);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_detach(<a class="code" href="classproton_1_1sender.html">se
 nder</a>&amp;);</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_close(<a class="code" href="classproton_1_1sender.html">sender</a>&amp;);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_error(<a class="code" href="classproton_1_1sender.html">sender</a>&amp;);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_tracker_accept(<a class="code"
  href="classproton_1_1tracker.html">tracker</a>&amp;);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_tracker_reject(<a class="code" href="classproton_1_1tracker.html">tracker</a>&amp;);</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_tracker_release(<a class="code" href="classproton_1_1tracker.html">tracker</a>&amp;);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtyp
 e">void</span> on_tracker_settle(<a class="code" href="classproton_1_1tracker.html">tracker</a>&amp;);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_delivery_settle(<a class="code" href="classproton_1_1delivery.html">delivery</a>&amp;);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_sender_drain_start(<a class="code" href="classproton_1_1sender.html">sender</a>&amp;);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    PN_CPP_EXTERN <span cl
 ass="keyword">virtual</span> <span class="keywordtype">void</span> on_receiver_drain_finish(<a class="code" href="classproton_1_1receiver.html">receiver</a>&amp;);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_connection_wake(<a class="code" href="classproton_1_1connection.html">connection</a>&amp;);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    PN_CPP_EXTERN <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_error(<span class="keyword">const</span> <a class="code" href="classproton_1_1error__condition.html">error_condition</a>&amp;);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;};</
 div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;} <span class="comment">// proton</span></div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="preprocessor">#endif // PROTON_MESSAGING_HANDLER_HPP</span></div><div class="ttc" id="classproton_1_1message_html"><div class="ttname"><a href="classproton_1_1message.html">proton::message</a></div><div class="ttdoc">An AMQP message. </div><div class="ttdef"><b>Definition:</b> message.hpp:50</div></div>
+<div class="ttc" id="classproton_1_1container_html"><div class="ttname"><a href="classproton_1_1container.html">proton::container</a></div><div class="ttdoc">A top-level container of connections, sessions, and links. </div><div class="ttdef"><b>Definition:</b> container.hpp:50</div></div>
 <div class="ttc" id="classproton_1_1sender_html"><div class="ttname"><a href="classproton_1_1sender.html">proton::sender</a></div><div class="ttdoc">A channel for sending messages. </div><div class="ttdef"><b>Definition:</b> sender.hpp:39</div></div>
 <div class="ttc" id="fwd_8hpp_html"><div class="ttname"><a href="fwd_8hpp.html">fwd.hpp</a></div><div class="ttdoc">Forward declarations. </div></div>
 <div class="ttc" id="classproton_1_1connection_html"><div class="ttname"><a href="classproton_1_1connection.html">proton::connection</a></div><div class="ttdoc">A connection to a remote AMQP peer. </div><div class="ttdef"><b>Definition:</b> connection.hpp:43</div></div>
@@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('messaging__handler_8hpp_source.html','
 <div class="ttc" id="classproton_1_1delivery_html"><div class="ttname"><a href="classproton_1_1delivery.html">proton::delivery</a></div><div class="ttdoc">A received message. </div><div class="ttdef"><b>Definition:</b> delivery.hpp:39</div></div>
 <div class="ttc" id="classproton_1_1tracker_html"><div class="ttname"><a href="classproton_1_1tracker.html">proton::tracker</a></div><div class="ttdoc">A tracker for a sent message. </div><div class="ttdef"><b>Definition:</b> tracker.hpp:40</div></div>
 <div class="ttc" id="classproton_1_1receiver_html"><div class="ttname"><a href="classproton_1_1receiver.html">proton::receiver</a></div><div class="ttdoc">A channel for receiving messages. </div><div class="ttdef"><b>Definition:</b> receiver.hpp:40</div></div>
-<div class="ttc" id="classproton_1_1messaging__handler_html"><div class="ttname"><a href="classproton_1_1messaging__handler.html">proton::messaging_handler</a></div><div class="ttdoc">A handler for Proton messaging events. </div><div class="ttdef"><b>Definition:</b> messaging_handler.hpp:61</div></div>
+<div class="ttc" id="classproton_1_1messaging__handler_html"><div class="ttname"><a href="classproton_1_1messaging__handler.html">proton::messaging_handler</a></div><div class="ttdoc">A handler for Proton messaging events. </div><div class="ttdef"><b>Definition:</b> messaging_handler.hpp:62</div></div>
 <div class="ttc" id="classproton_1_1transport_html"><div class="ttname"><a href="classproton_1_1transport.html">proton::transport</a></div><div class="ttdoc">A network channel supporting an AMQP connection. </div><div class="ttdef"><b>Definition:</b> transport.hpp:37</div></div>
 <div class="ttc" id="namespaceproton_html"><div class="ttname"><a href="namespaceproton.html">proton</a></div><div class="ttdoc">The main Proton namespace. </div><div class="ttdef"><b>Definition:</b> annotation_key.hpp:33</div></div>
 <div class="ttc" id="classproton_1_1error__condition_html"><div class="ttname"><a href="classproton_1_1error__condition.html">proton::error_condition</a></div><div class="ttdoc">Describes an endpoint error state. </div><div class="ttdef"><b>Definition:</b> error_condition.hpp:40</div></div>

http://git-wip-us.apache.org/repos/asf/qpid-site/blob/701caf21/content/releases/qpid-proton-master/proton/cpp/api/mt_page.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-master/proton/cpp/api/mt_page.html b/content/releases/qpid-proton-master/proton/cpp/api/mt_page.html
index 2c5a46f..a97973f 100755
--- a/content/releases/qpid-proton-master/proton/cpp/api/mt_page.html
+++ b/content/releases/qpid-proton-master/proton/cpp/api/mt_page.html
@@ -94,21 +94,19 @@ $(document).ready(function(){initNavTree('mt_page.html','');});
 </div><!--header-->
 <div class="contents">
 <div class="textblock"><p>Full multithreading support is available with C++11 and later. Limited multithreading is possible with older versions of C++. See the last section of this page for more information.</p>
+<p><code><a class="el" href="classproton_1_1container.html" title="A top-level container of connections, sessions, and links. ">proton::container</a></code> handles multiple connections concurrently in a thread pool, created using <code><a class="el" href="classproton_1_1container.html#a13a43e6d814de94978c515cb084873b1" title="Run the container in the current thread. ">proton::container::run()</a></code>. As AMQP events occur on a connection the container calls <code><a class="el" href="classproton_1_1messaging__handler.html" title="A handler for Proton messaging events. ">proton::messaging_handler</a></code> event callbacks. The calls for each connection are <em>serialized</em> - callbacks for the same connection are never made concurrently.</p>
+<p>You assign a handler to a connection in <code><a class="el" href="classproton_1_1container.html#adbd9ed231804512a47cca3c81f00cdf1" title="Connect to conn_url and send an open request to the remote peer. ">proton::container::connect()</a></code> or <code><a class="el" href="classproton_1_1listen__handler.html#a3f8b8dc9641dc3a3ed19e2a60ec8eccc" title="Called for each accepted connection. ">proton::listen_handler::on_accept()</a></code> with <code><a class="el" href="classproton_1_1connection__options.html#a7bca23aeb3455378ef2d35975758e504" title="Set a connection handler. ">proton::connection_options::handler()</a></code>. We recommend you create a separate handler for each connection. That means the handler doesn't need locks or other synchronization to protect it against concurrent use by Proton threads. If you use the handler concurrently from non-Proton threads then you will need synchronization.</p>
+<p>The examples <a class="el" href="multithreaded_client_8cpp-example.html">multithreaded_client.cpp</a> and <a class="el" href="multithreaded_client_flow_control_8cpp-example.html">multithreaded_client_flow_control.cpp</a> illustrate these points.</p>
 <h2>Thread-safety rules</h2>
-<p><code><a class="el" href="classproton_1_1message.html" title="An AMQP message. ">proton::message</a></code> is a value type with the same threading constraints as a standard C++ built-in type. It cannot be concurrently modified.</p>
-<p>The <code><a class="el" href="classproton_1_1container.html" title="A top-level container of connections, sessions, and links. ">proton::container</a></code> is thread-safe <em>with C++11 or greater</em>. It has the following capabilities.</p>
-<ul>
-<li>Application threads can open (or listen for) new connections at any time.</li>
-<li>It manages worker threads to process connections.</li>
-<li>It handles network IO and calls the relevant <code><a class="el" href="classproton_1_1messaging__handler.html" title="A handler for Proton messaging events. ">proton::messaging_handler</a></code> event callbacks to execute application code.</li>
-</ul>
-<p>The <code><a class="el" href="classproton_1_1container.html" title="A top-level container of connections, sessions, and links. ">proton::container</a></code> ensures that calls to event callbacks for each connection instance are <em>serialized</em> (not called concurrently), but callbacks for different connections can be safely executed in parallel.</p>
-<p>The <code><a class="el" href="classproton_1_1connection.html" title="A connection to a remote AMQP peer. ">proton::connection</a></code> and related objects (<code><a class="el" href="classproton_1_1session.html" title="A container of senders and receivers. ">proton::session</a></code>, <code><a class="el" href="classproton_1_1sender.html" title="A channel for sending messages. ">proton::sender</a></code>, <code><a class="el" href="classproton_1_1receiver.html" title="A channel for receiving messages. ">proton::receiver</a></code>, <code><a class="el" href="classproton_1_1delivery.html" title="A received message. ">proton::delivery</a></code>) are <em>not</em> thread-safe and are subject to the following rules.</p>
+<p><code><a class="el" href="classproton_1_1container.html" title="A top-level container of connections, sessions, and links. ">proton::container</a></code> is thread-safe <em>with C++11 or greater</em>. An application thread can open (or listen for) new connections at any time. The container uses threads that call <code><a class="el" href="classproton_1_1container.html#a13a43e6d814de94978c515cb084873b1" title="Run the container in the current thread. ">proton::container::run()</a></code> to handle network IO and call user-defined <code><a class="el" href="classproton_1_1messaging__handler.html" title="A handler for Proton messaging events. ">proton::messaging_handler</a></code> callbacks.</p>
+<p><code><a class="el" href="classproton_1_1container.html" title="A top-level container of connections, sessions, and links. ">proton::container</a></code> ensures that calls to event callbacks for each connection instance are <em>serialized</em> (not called concurrently), but callbacks for different connections can be safely executed in parallel.</p>
+<p><code><a class="el" href="classproton_1_1connection.html" title="A connection to a remote AMQP peer. ">proton::connection</a></code> and related objects (<code><a class="el" href="classproton_1_1session.html" title="A container of senders and receivers. ">proton::session</a></code>, <code><a class="el" href="classproton_1_1sender.html" title="A channel for sending messages. ">proton::sender</a></code>, <code><a class="el" href="classproton_1_1receiver.html" title="A channel for receiving messages. ">proton::receiver</a></code>, <code><a class="el" href="classproton_1_1delivery.html" title="A received message. ">proton::delivery</a></code>) are <em>not</em> thread-safe and are subject to the following rules.</p>
 <ol type="1">
 <li>They can only be used from a <code><a class="el" href="classproton_1_1messaging__handler.html" title="A handler for Proton messaging events. ">proton::messaging_handler</a></code> event callback called by Proton or a <code><a class="el" href="classproton_1_1work__queue.html" title="Unsettled API - A context for thread-safe execution of work. ">proton::work_queue</a></code> function (more below).</li>
 <li>You cannot use objects belonging to one connection from a callback for another connection. We recommend a single handler instance per connection to avoid confusion.</li>
 <li>You can store Proton objects in member variables for use in a later callback, provided you respect rule two.</li>
 </ol>
+<p><code><a class="el" href="classproton_1_1message.html" title="An AMQP message. ">proton::message</a></code> is a value type with the same threading constraints as a standard C++ built-in type. It cannot be concurrently modified.</p>
 <h2>Work queues</h2>
 <p><code><a class="el" href="classproton_1_1work__queue.html" title="Unsettled API - A context for thread-safe execution of work. ">proton::work_queue</a></code> provides a safe way to communicate between different connection handlers or between non-Proton threads and connection handlers.</p>
 <ul>

http://git-wip-us.apache.org/repos/asf/qpid-site/blob/701caf21/content/releases/qpid-proton-master/proton/cpp/api/multithreaded_client_8cpp-example.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-master/proton/cpp/api/multithreaded_client_8cpp-example.html b/content/releases/qpid-proton-master/proton/cpp/api/multithreaded_client_8cpp-example.html
index d1f4f38..407b2cf 100755
--- a/content/releases/qpid-proton-master/proton/cpp/api/multithreaded_client_8cpp-example.html
+++ b/content/releases/qpid-proton-master/proton/cpp/api/multithreaded_client_8cpp-example.html
@@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('multithreaded_client_8cpp-example.html
 </div><!--header-->
 <div class="contents">
 <p>A multithreaded sender and receiver.<b>Requires C++11</b></p>
-<div class="fragment"><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div><div class="line"><span class="comment"> * or more contributor license agreements.  See the NOTICE file</span></div><div class="line"><span class="comment"> * distributed with this work for additional information</span></div><div class="line"><span class="comment"> * regarding copyright ownership.  The ASF licenses this file</span></div><div class="line"><span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div><div class="line"><span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div><div class="line"><span class="comment"> * with the License.  You may obtain a copy of the License at</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> *   http://www.apache.org/li
 censes/LICENSE-2.0</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div><div class="line"><span class="comment"> * software distributed under the License is distributed on an</span></div><div class="line"><span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div><div class="line"><span class="comment"> * KIND, either express or implied.  See the License for the</span></div><div class="line"><span class="comment"> * specific language governing permissions and limitations</span></div><div class="line"><span class="comment"> * under the License.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">// C++11 or greater</span></div><div class="line"><span class="comment">//</span></div><d
 iv class="line"><span class="comment">// A multi-threaded client that calls proton::container::run() in one thread, sends</span></div><div class="line"><span class="comment">// messages in another and receives messages in a third.</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">// Note this client does not deal with flow-control. If the sender is faster</span></div><div class="line"><span class="comment">// than the receiver, messages will build up in memory on the sending side.</span></div><div class="line"><span class="comment">// See @ref multithreaded_client_flow_control.cpp for a more complex example with</span></div><div class="line"><span class="comment">// flow control.</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">// NOTE: no proper error handling</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" 
 href="connection_8hpp.html">proton/connection.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="connection__options_8hpp.html">proton/connection_options.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="container_8hpp.html">proton/container.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="message_8hpp.html">proton/message.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="messaging__handler_8hpp.html">proton/messaging_handler.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="receiver_8hpp.html">proton/receiver.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="sender_8hpp.html">proton/sender.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#inclu
 de &lt;<a class="code" href="work__queue_8hpp.html">proton/work_queue.hpp</a>&gt;</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;condition_variable&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;mutex&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;queue&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;sstream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;thread&gt;</span></div><div class="line"></div><div class="line"><span class="comment">// Lock output from threads to avoid scramblin</span></div><div class="line">std::mutex out_lock;</div><div class="line"><span class="preprocessor">#define OUT(x) do { std::lock_guard&lt;std::mutex&gt; l(out_lock); x; } while (false)</
 span></div><div class="line"></div><div class="line"><span class="comment">// Handler for a single thread-safe sending and receiving connection.</span></div><div class="line"><span class="keyword">class </span>client : <span class="keyword">public</span> <a name="_a0"></a><a class="code" href="classproton_1_1messaging__handler.html">proton::messaging_handler</a> {</div><div class="line">    <span class="comment">// Invariant</span></div><div class="line">    <span class="keyword">const</span> std::string url_;</div><div class="line">    <span class="keyword">const</span> std::string address_;</div><div class="line"></div><div class="line">    <span class="comment">// Only used in proton handler thread</span></div><div class="line">    <a name="_a1"></a><a class="code" href="classproton_1_1sender.html">proton::sender</a> sender_;</div><div class="line"></div><div class="line">    <span class="comment">// Shared by proton and user threads, protected by lock_</span></div><div class="li
 ne">    std::mutex lock_;</div><div class="line">    <a name="_a2"></a><a class="code" href="classproton_1_1work__queue.html">proton::work_queue</a> *work_queue_;</div><div class="line">    std::condition_variable sender_ready_;</div><div class="line">    std::queue&lt;proton::message&gt; messages_;</div><div class="line">    std::condition_variable messages_ready_;</div><div class="line"></div><div class="line">  <span class="keyword">public</span>:</div><div class="line">    client(<span class="keyword">const</span> std::string&amp; url, <span class="keyword">const</span> std::string&amp; address) : url_(url), address_(address), work_queue_(0) {}</div><div class="line"></div><div class="line">    <span class="comment">// Thread safe</span></div><div class="line">    <span class="keywordtype">void</span> send(<span class="keyword">const</span> <a name="_a3"></a><a class="code" href="classproton_1_1message.html">proton::message</a>&amp; msg) {</div><div class="line">        <span cl
 ass="comment">// Use [=] to copy the message, we cannot pass it by reference since it</span></div><div class="line">        <span class="comment">// will be used in another thread.</span></div><div class="line">        work_queue()-&gt;<a name="a4"></a><a class="code" href="classproton_1_1work__queue.html#a59dae2153455bc095477a3b66a0b681e">add</a>([=]() { sender_.<a name="a5"></a><a class="code" href="classproton_1_1sender.html#a214eb30b24e6831d016a47b9dddda830">send</a>(msg); });</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Thread safe</span></div><div class="line">    <a class="code" href="classproton_1_1message.html">proton::message</a> receive() {</div><div class="line">        std::unique_lock&lt;std::mutex&gt; l(lock_);</div><div class="line">        <span class="keywordflow">while</span> (messages_.empty()) messages_ready_.wait(l);</div><div class="line">        <span class="keyword">auto</span> msg = std::move(messa
 ges_.front());</div><div class="line">        messages_.pop();</div><div class="line">        <span class="keywordflow">return</span> msg;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Thread safe</span></div><div class="line">    <span class="keywordtype">void</span> close() {</div><div class="line">        work_queue()-&gt;add([=]() { sender_.<a name="a6"></a><a class="code" href="classproton_1_1link.html#aff302bb6016f2ae29f01bb4e07389a52">connection</a>().<a name="a7"></a><a class="code" href="classproton_1_1connection.html#a5ae591df94fc66ccb85cbb6565368bca">close</a>(); });</div><div class="line">    }</div><div class="line"></div><div class="line">  <span class="keyword">private</span>:</div><div class="line"></div><div class="line">    <a class="code" href="classproton_1_1work__queue.html">proton::work_queue</a>* work_queue() {</div><div class="line">        <span class="comment">// Wait till work_queue_ and sender_ ar
 e initialized.</span></div><div class="line">        std::unique_lock&lt;std::mutex&gt; l(lock_);</div><div class="line">        <span class="keywordflow">while</span> (!work_queue_) sender_ready_.wait(l);</div><div class="line">        <span class="keywordflow">return</span> work_queue_;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// == messaging_handler overrides, only called in proton hander thread</span></div><div class="line"></div><div class="line">    <span class="comment">// Note: this example creates a connection when the container starts.</span></div><div class="line">    <span class="comment">// To create connections after the container has started, use</span></div><div class="line">    <span class="comment">// container::connect().</span></div><div class="line">    <span class="comment">// See @ref multithreaded_client_flow_control.cpp for an example.</span></div><div class="line">    <span class="keywordtype">voi
 d</span> <a name="a8"></a><a class="code" href="classproton_1_1messaging__handler.html#a4949b0c93402fae0c07492d984688a25">on_container_start</a>(<a name="_a9"></a><a class="code" href="classproton_1_1container.html">proton::container</a>&amp; cont)<span class="keyword"> override </span>{</div><div class="line">        cont.<a name="a10"></a><a class="code" href="classproton_1_1container.html#adbd9ed231804512a47cca3c81f00cdf1">connect</a>(url_);</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a11"></a><a class="code" href="classproton_1_1messaging__handler.html#a16ba022e899957b2e25b9561b1f53968">on_connection_open</a>(<a name="_a12"></a><a class="code" href="classproton_1_1connection.html">proton::connection</a>&amp; conn)<span class="keyword"> override </span>{</div><div class="line">        conn.<a name="a13"></a><a class="code" href="classproton_1_1connection.html#ae8eece4fd4b9e1a2531ca12d2ab57a32">open
 _sender</a>(address_);</div><div class="line">        conn.<a name="a14"></a><a class="code" href="classproton_1_1connection.html#aad60d14592ee9d34caca4c61214ecd27">open_receiver</a>(address_);</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a15"></a><a class="code" href="classproton_1_1messaging__handler.html#a0b5d066e5463d3365f662c8a7dc52661">on_sender_open</a>(<a class="code" href="classproton_1_1sender.html">proton::sender</a>&amp; s)<span class="keyword"> override </span>{</div><div class="line">        <span class="comment">// sender_ and work_queue_ must be set atomically</span></div><div class="line">        std::lock_guard&lt;std::mutex&gt; l(lock_);</div><div class="line">        sender_ = s;</div><div class="line">        work_queue_ = &amp;s.<a name="a16"></a><a class="code" href="classproton_1_1link.html#a7c755d6ac6385e007adb61966598ba63">work_queue</a>();</div><div class="line">        sende
 r_ready_.notify_all();</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a17"></a><a class="code" href="classproton_1_1messaging__handler.html#a96879b0b0b7ade11f98d3f450abd4c46">on_message</a>(<a name="_a18"></a><a class="code" href="classproton_1_1delivery.html">proton::delivery</a>&amp; dlv, <a class="code" href="classproton_1_1message.html">proton::message</a>&amp; msg)<span class="keyword"> override </span>{</div><div class="line">        std::lock_guard&lt;std::mutex&gt; l(lock_);</div><div class="line">        messages_.push(msg);</div><div class="line">        messages_ready_.notify_all();</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a19"></a><a class="code" href="classproton_1_1messaging__handler.html#a5e29fef3b8c5b8cf18aa7d69850ac22e">on_error</a>(<span class="keyword">const</span> <a name="_a20"></a><a class="code" h
 ref="classproton_1_1error__condition.html">proton::error_condition</a>&amp; e)<span class="keyword"> override </span>{</div><div class="line">        OUT(std::cerr &lt;&lt; <span class="stringliteral">&quot;unexpected error: &quot;</span> &lt;&lt; e &lt;&lt; std::endl);</div><div class="line">        exit(1);</div><div class="line">    }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>** argv) {</div><div class="line">    <span class="keywordflow">try</span> {</div><div class="line">        <span class="keywordflow">if</span> (argc != 4) {</div><div class="line">            std ::cerr &lt;&lt;</div><div class="line">                <span class="stringliteral">&quot;Usage: &quot;</span> &lt;&lt; argv[0] &lt;&lt; <span class="stringliteral">&quot; CONNECTION-URL AMQP-ADDRESS MESSAGE-COUNT\n&quot;</span></d
 iv><div class="line">                <span class="stringliteral">&quot;CONNECTION-URL: connection address, e.g.&#39;amqp://127.0.0.1&#39;\n&quot;</span></div><div class="line">                <span class="stringliteral">&quot;AMQP-ADDRESS: AMQP node address, e.g. &#39;examples&#39;\n&quot;</span></div><div class="line">                <span class="stringliteral">&quot;MESSAGE-COUNT: number of messages to send\n&quot;</span>;</div><div class="line">            <span class="keywordflow">return</span> 1;</div><div class="line">        }</div><div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *url = argv[1];</div><div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *address = argv[2];</div><div class="line">        <span class="keywordtype">int</span> n_messages = atoi(argv[3]);</div><div class="line"></div><div class="line">        client cl(url, address);</div><div class="line">        <a cla
 ss="code" href="classproton_1_1container.html">proton::container</a> container(cl);</div><div class="line">        std::thread container_thread([&amp;]() { container.<a name="a21"></a><a class="code" href="classproton_1_1container.html#a13a43e6d814de94978c515cb084873b1">run</a>(); });</div><div class="line"></div><div class="line">        std::thread sender([&amp;]() {</div><div class="line">                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n_messages; ++i) {</div><div class="line">                    <a class="code" href="classproton_1_1message.html">proton::message</a> msg(<a name="a22"></a><a class="code" href="namespaceproton.html#a1367d11b0ac6a99ea8e7d9a5b8f36b34">std::to_string</a>(i + 1));</div><div class="line">                    cl.send(msg);</div><div class="line">                    OUT(std::cout &lt;&lt; <span class="stringliteral">&quot;sent \&quot;&quot;</span> &lt;&lt; msg.<a name="a23"></a><a class="code" href="
 classproton_1_1message.html#ae9af642f154a68ec0eb8e715ecaf95ae">body</a>() &lt;&lt; <span class="charliteral">&#39;&quot;&#39;</span> &lt;&lt; std::endl);</div><div class="line">                }</div><div class="line">            });</div><div class="line"></div><div class="line">        <span class="keywordtype">int</span> received = 0;</div><div class="line">        std::thread receiver([&amp;]() {</div><div class="line">                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n_messages; ++i) {</div><div class="line">                    <span class="keyword">auto</span> msg = cl.receive();</div><div class="line">                    OUT(std::cout &lt;&lt; <span class="stringliteral">&quot;received \&quot;&quot;</span> &lt;&lt; msg.body() &lt;&lt; <span class="charliteral">&#39;&quot;&#39;</span> &lt;&lt; std::endl);</div><div class="line">                    ++received;</div><div class="line">                }</div><div class="line">
             });</div><div class="line"></div><div class="line">        sender.join();</div><div class="line">        receiver.join();</div><div class="line">        cl.close();</div><div class="line">        container_thread.join();</div><div class="line">        std::cout &lt;&lt; received &lt;&lt; <span class="stringliteral">&quot; messages sent and received&quot;</span> &lt;&lt; std::endl;</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> 0;</div><div class="line">    } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div><div class="line">        std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> 1;</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
+<div class="fragment"><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div><div class="line"><span class="comment"> * or more contributor license agreements.  See the NOTICE file</span></div><div class="line"><span class="comment"> * distributed with this work for additional information</span></div><div class="line"><span class="comment"> * regarding copyright ownership.  The ASF licenses this file</span></div><div class="line"><span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div><div class="line"><span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div><div class="line"><span class="comment"> * with the License.  You may obtain a copy of the License at</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> *   http://www.apache.org/li
 censes/LICENSE-2.0</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div><div class="line"><span class="comment"> * software distributed under the License is distributed on an</span></div><div class="line"><span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div><div class="line"><span class="comment"> * KIND, either express or implied.  See the License for the</span></div><div class="line"><span class="comment"> * specific language governing permissions and limitations</span></div><div class="line"><span class="comment"> * under the License.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">// C++11 or greater</span></div><div class="line"><span class="comment">//</span></div><d
 iv class="line"><span class="comment">// A multi-threaded client that calls proton::container::run() in one thread, sends</span></div><div class="line"><span class="comment">// messages in another and receives messages in a third.</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">// Note this client does not deal with flow-control. If the sender is faster</span></div><div class="line"><span class="comment">// than the receiver, messages will build up in memory on the sending side.</span></div><div class="line"><span class="comment">// See @ref multithreaded_client_flow_control.cpp for a more complex example with</span></div><div class="line"><span class="comment">// flow control.</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">// NOTE: no proper error handling</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" 
 href="connection_8hpp.html">proton/connection.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="connection__options_8hpp.html">proton/connection_options.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="container_8hpp.html">proton/container.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="message_8hpp.html">proton/message.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="messaging__handler_8hpp.html">proton/messaging_handler.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="receiver_8hpp.html">proton/receiver.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="sender_8hpp.html">proton/sender.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#inclu
 de &lt;<a class="code" href="work__queue_8hpp.html">proton/work_queue.hpp</a>&gt;</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;condition_variable&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;mutex&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;queue&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;sstream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;thread&gt;</span></div><div class="line"></div><div class="line"><span class="comment">// Lock output from threads to avoid scrambling</span></div><div class="line">std::mutex out_lock;</div><div class="line"><span class="preprocessor">#define OUT(x) do { std::lock_guard&lt;std::mutex&gt; l(out_lock); x; } while (false)<
 /span></div><div class="line"></div><div class="line"><span class="comment">// Handler for a single thread-safe sending and receiving connection.</span></div><div class="line"><span class="keyword">class </span>client : <span class="keyword">public</span> <a name="_a0"></a><a class="code" href="classproton_1_1messaging__handler.html">proton::messaging_handler</a> {</div><div class="line">    <span class="comment">// Invariant</span></div><div class="line">    <span class="keyword">const</span> std::string url_;</div><div class="line">    <span class="keyword">const</span> std::string address_;</div><div class="line"></div><div class="line">    <span class="comment">// Only used in proton handler thread</span></div><div class="line">    <a name="_a1"></a><a class="code" href="classproton_1_1sender.html">proton::sender</a> sender_;</div><div class="line"></div><div class="line">    <span class="comment">// Shared by proton and user threads, protected by lock_</span></div><div class="l
 ine">    std::mutex lock_;</div><div class="line">    <a name="_a2"></a><a class="code" href="classproton_1_1work__queue.html">proton::work_queue</a> *work_queue_;</div><div class="line">    std::condition_variable sender_ready_;</div><div class="line">    std::queue&lt;proton::message&gt; messages_;</div><div class="line">    std::condition_variable messages_ready_;</div><div class="line"></div><div class="line">  <span class="keyword">public</span>:</div><div class="line">    client(<span class="keyword">const</span> std::string&amp; url, <span class="keyword">const</span> std::string&amp; address) : url_(url), address_(address), work_queue_(0) {}</div><div class="line"></div><div class="line">    <span class="comment">// Thread safe</span></div><div class="line">    <span class="keywordtype">void</span> send(<span class="keyword">const</span> <a name="_a3"></a><a class="code" href="classproton_1_1message.html">proton::message</a>&amp; msg) {</div><div class="line">        <span c
 lass="comment">// Use [=] to copy the message, we cannot pass it by reference since it</span></div><div class="line">        <span class="comment">// will be used in another thread.</span></div><div class="line">        work_queue()-&gt;<a name="a4"></a><a class="code" href="classproton_1_1work__queue.html#a59dae2153455bc095477a3b66a0b681e">add</a>([=]() { sender_.<a name="a5"></a><a class="code" href="classproton_1_1sender.html#a214eb30b24e6831d016a47b9dddda830">send</a>(msg); });</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Thread safe</span></div><div class="line">    <a class="code" href="classproton_1_1message.html">proton::message</a> receive() {</div><div class="line">        std::unique_lock&lt;std::mutex&gt; l(lock_);</div><div class="line">        <span class="keywordflow">while</span> (messages_.empty()) messages_ready_.wait(l);</div><div class="line">        <span class="keyword">auto</span> msg = std::move(mess
 ages_.front());</div><div class="line">        messages_.pop();</div><div class="line">        <span class="keywordflow">return</span> msg;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Thread safe</span></div><div class="line">    <span class="keywordtype">void</span> close() {</div><div class="line">        work_queue()-&gt;add([=]() { sender_.<a name="a6"></a><a class="code" href="classproton_1_1link.html#aff302bb6016f2ae29f01bb4e07389a52">connection</a>().<a name="a7"></a><a class="code" href="classproton_1_1connection.html#a5ae591df94fc66ccb85cbb6565368bca">close</a>(); });</div><div class="line">    }</div><div class="line"></div><div class="line">  <span class="keyword">private</span>:</div><div class="line"></div><div class="line">    <a class="code" href="classproton_1_1work__queue.html">proton::work_queue</a>* work_queue() {</div><div class="line">        <span class="comment">// Wait till work_queue_ and sender_ a
 re initialized.</span></div><div class="line">        std::unique_lock&lt;std::mutex&gt; l(lock_);</div><div class="line">        <span class="keywordflow">while</span> (!work_queue_) sender_ready_.wait(l);</div><div class="line">        <span class="keywordflow">return</span> work_queue_;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// == messaging_handler overrides, only called in proton handler thread</span></div><div class="line"></div><div class="line">    <span class="comment">// Note: this example creates a connection when the container starts.</span></div><div class="line">    <span class="comment">// To create connections after the container has started, use</span></div><div class="line">    <span class="comment">// container::connect().</span></div><div class="line">    <span class="comment">// See @ref multithreaded_client_flow_control.cpp for an example.</span></div><div class="line">    <span class="keywordtype">v
 oid</span> <a name="a8"></a><a class="code" href="classproton_1_1messaging__handler.html#a9188622c33638e076d2214080129c824">on_container_start</a>(<a name="_a9"></a><a class="code" href="classproton_1_1container.html">proton::container</a>&amp; cont)<span class="keyword"> override </span>{</div><div class="line">        cont.<a name="a10"></a><a class="code" href="classproton_1_1container.html#adbd9ed231804512a47cca3c81f00cdf1">connect</a>(url_);</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a11"></a><a class="code" href="classproton_1_1messaging__handler.html#a41277abe0e33a3df2764b08dcc12d768">on_connection_open</a>(<a name="_a12"></a><a class="code" href="classproton_1_1connection.html">proton::connection</a>&amp; conn)<span class="keyword"> override </span>{</div><div class="line">        conn.<a name="a13"></a><a class="code" href="classproton_1_1connection.html#ae8eece4fd4b9e1a2531ca12d2ab57a32">op
 en_sender</a>(address_);</div><div class="line">        conn.<a name="a14"></a><a class="code" href="classproton_1_1connection.html#aad60d14592ee9d34caca4c61214ecd27">open_receiver</a>(address_);</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a15"></a><a class="code" href="classproton_1_1messaging__handler.html#ac655d56c64574c9eb7b10e80d32764f4">on_sender_open</a>(<a class="code" href="classproton_1_1sender.html">proton::sender</a>&amp; s)<span class="keyword"> override </span>{</div><div class="line">        <span class="comment">// sender_ and work_queue_ must be set atomically</span></div><div class="line">        std::lock_guard&lt;std::mutex&gt; l(lock_);</div><div class="line">        sender_ = s;</div><div class="line">        work_queue_ = &amp;s.<a name="a16"></a><a class="code" href="classproton_1_1link.html#a7c755d6ac6385e007adb61966598ba63">work_queue</a>();</div><div class="line">        sen
 der_ready_.notify_all();</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a17"></a><a class="code" href="classproton_1_1messaging__handler.html#a584c9daeadf4322801f58e054017fecb">on_message</a>(<a name="_a18"></a><a class="code" href="classproton_1_1delivery.html">proton::delivery</a>&amp; dlv, <a class="code" href="classproton_1_1message.html">proton::message</a>&amp; msg)<span class="keyword"> override </span>{</div><div class="line">        std::lock_guard&lt;std::mutex&gt; l(lock_);</div><div class="line">        messages_.push(msg);</div><div class="line">        messages_ready_.notify_all();</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">void</span> <a name="a19"></a><a class="code" href="classproton_1_1messaging__handler.html#a042f595d1807eb1abe0195ab79357edd">on_error</a>(<span class="keyword">const</span> <a name="_a20"></a><a class="code"
  href="classproton_1_1error__condition.html">proton::error_condition</a>&amp; e)<span class="keyword"> override </span>{</div><div class="line">        OUT(std::cerr &lt;&lt; <span class="stringliteral">&quot;unexpected error: &quot;</span> &lt;&lt; e &lt;&lt; std::endl);</div><div class="line">        exit(1);</div><div class="line">    }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>** argv) {</div><div class="line">    <span class="keywordflow">try</span> {</div><div class="line">        <span class="keywordflow">if</span> (argc != 4) {</div><div class="line">            std ::cerr &lt;&lt;</div><div class="line">                <span class="stringliteral">&quot;Usage: &quot;</span> &lt;&lt; argv[0] &lt;&lt; <span class="stringliteral">&quot; CONNECTION-URL AMQP-ADDRESS MESSAGE-COUNT\n&quot;</span><
 /div><div class="line">                <span class="stringliteral">&quot;CONNECTION-URL: connection address, e.g.&#39;amqp://127.0.0.1&#39;\n&quot;</span></div><div class="line">                <span class="stringliteral">&quot;AMQP-ADDRESS: AMQP node address, e.g. &#39;examples&#39;\n&quot;</span></div><div class="line">                <span class="stringliteral">&quot;MESSAGE-COUNT: number of messages to send\n&quot;</span>;</div><div class="line">            <span class="keywordflow">return</span> 1;</div><div class="line">        }</div><div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *url = argv[1];</div><div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *address = argv[2];</div><div class="line">        <span class="keywordtype">int</span> n_messages = atoi(argv[3]);</div><div class="line"></div><div class="line">        client cl(url, address);</div><div class="line">        <a c
 lass="code" href="classproton_1_1container.html">proton::container</a> container(cl);</div><div class="line">        std::thread container_thread([&amp;]() { container.<a name="a21"></a><a class="code" href="classproton_1_1container.html#a13a43e6d814de94978c515cb084873b1">run</a>(); });</div><div class="line"></div><div class="line">        std::thread sender([&amp;]() {</div><div class="line">                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n_messages; ++i) {</div><div class="line">                    <a class="code" href="classproton_1_1message.html">proton::message</a> msg(<a name="a22"></a><a class="code" href="namespaceproton.html#a1367d11b0ac6a99ea8e7d9a5b8f36b34">std::to_string</a>(i + 1));</div><div class="line">                    cl.send(msg);</div><div class="line">                    OUT(std::cout &lt;&lt; <span class="stringliteral">&quot;sent \&quot;&quot;</span> &lt;&lt; msg.<a name="a23"></a><a class="code" href
 ="classproton_1_1message.html#ae9af642f154a68ec0eb8e715ecaf95ae">body</a>() &lt;&lt; <span class="charliteral">&#39;&quot;&#39;</span> &lt;&lt; std::endl);</div><div class="line">                }</div><div class="line">            });</div><div class="line"></div><div class="line">        <span class="keywordtype">int</span> received = 0;</div><div class="line">        std::thread receiver([&amp;]() {</div><div class="line">                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n_messages; ++i) {</div><div class="line">                    <span class="keyword">auto</span> msg = cl.receive();</div><div class="line">                    OUT(std::cout &lt;&lt; <span class="stringliteral">&quot;received \&quot;&quot;</span> &lt;&lt; msg.body() &lt;&lt; <span class="charliteral">&#39;&quot;&#39;</span> &lt;&lt; std::endl);</div><div class="line">                    ++received;</div><div class="line">                }</div><div class="line
 ">            });</div><div class="line"></div><div class="line">        sender.join();</div><div class="line">        receiver.join();</div><div class="line">        cl.close();</div><div class="line">        container_thread.join();</div><div class="line">        std::cout &lt;&lt; received &lt;&lt; <span class="stringliteral">&quot; messages sent and received&quot;</span> &lt;&lt; std::endl;</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> 0;</div><div class="line">    } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div><div class="line">        std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> 1;</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
 </div><!-- doc-content -->
 <!-- start footer part -->
 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message