Skip to content

Commit

Permalink
Updated documents.
Browse files Browse the repository at this point in the history
  • Loading branch information
redboltz committed Oct 8, 2024
1 parent 7b9b2a3 commit 58696ff
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 91 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
= History

== 9.0.2
* Fixed TLS timeout logic. #357
* Fixed broker auth file for docker. #356

== 9.0.1
Expand Down
3 changes: 3 additions & 0 deletions doc/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ <h2 id="_9_0_2">9.0.2</h2>
<div class="ulist">
<ul>
<li>
<p>Fixed TLS timeout logic. #357</p>
</li>
<li>
<p>Fixed broker auth file for docker. #356</p>
</li>
</ul>
Expand Down
101 changes: 41 additions & 60 deletions doc/api/customized__ssl__stream_8hpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,68 +162,49 @@
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> stream.get_executor(),</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> shutdown_timeout</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> );</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">auto</span> self_sp = std::make_shared&lt;Self&gt;(force_move(self));</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">auto</span> sig = std::make_shared&lt;as::cancellation_signal&gt;();</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> tim-&gt;async_wait(</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> as::consign(</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> as::append(</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> std::ref(*self_sp),</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> std::weak_ptr&lt;as::steady_timer&gt;(tim)</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> ),</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> self_sp</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> )</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> );</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> stream.async_shutdown(</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> as::consign(</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> std::ref(*self_sp),</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> self_sp,</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> tim</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> )</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> );</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Self&gt;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> operator()(</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> Self&amp; self,</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_typedef" href="group__error.html#gaa100a3fca173f12e33f3b5711710033d">error_code</a> <span class="keyword">const</span>&amp; ec,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> std::weak_ptr&lt;as::steady_timer&gt; wp</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> ) {</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">if</span> (!ec) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">if</span> (<span class="keyword">auto</span> sp = wp.lock()) {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> ASYNC_MQTT_LOG(<span class="stringliteral">&quot;mqtt_impl&quot;</span>, <a class="code hl_enumvalue" href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">info</a>)</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> &lt;&lt; <span class="stringliteral">&quot;TLS async_shutdown timeout&quot;</span>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> BOOST_ASSERT(state == shutdown);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> state = complete;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> self.complete(ec);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> }</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> ASYNC_MQTT_LOG(<span class="stringliteral">&quot;mqtt_impl&quot;</span>, <a class="code hl_enumvalue" href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">info</a>)</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> &lt;&lt; <span class="stringliteral">&quot;TLS async_shutdown timeout doesn&#39;t processed. ec:&quot;</span> &lt;&lt; ec.message();</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> }</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Self&gt;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordtype">void</span> operator()(</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> Self&amp; self,</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_typedef" href="group__error.html#gaa100a3fca173f12e33f3b5711710033d">error_code</a> <span class="keyword">const</span>&amp; ec</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> ) {</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">if</span> (state == complete) {</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> ASYNC_MQTT_LOG(<span class="stringliteral">&quot;mqtt_impl&quot;</span>, <a class="code hl_enumvalue" href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">info</a>)</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> &lt;&lt; <span class="stringliteral">&quot;TLS async_shutdown already timeout&quot;</span>;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ASYNC_MQTT_LOG(<span class="stringliteral">&quot;mqtt_impl&quot;</span>, <a class="code hl_enumvalue" href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">info</a>)</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> &lt;&lt; <span class="stringliteral">&quot;TLS async_shutdown ec:&quot;</span> &lt;&lt; ec.message();</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> state = complete;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> self.complete(ec);</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> };</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>};</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> [sig, wp = std::weak_ptr&lt;as::steady_timer&gt;(tim)]</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> (<a class="code hl_typedef" href="group__error.html#gaa100a3fca173f12e33f3b5711710033d">error_code</a> <span class="keyword">const</span>&amp; ec) {</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">if</span> (!ec) {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">if</span> (<span class="keyword">auto</span> sp = wp.lock()) {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> ASYNC_MQTT_LOG(<span class="stringliteral">&quot;mqtt_impl&quot;</span>, <a class="code hl_enumvalue" href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">info</a>)</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> &lt;&lt; <span class="stringliteral">&quot;TLS async_shutdown timeout&quot;</span>;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> sig-&gt;emit(as::cancellation_type::terminal);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> }</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> );</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">auto</span>&amp; a_stream{stream};</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> a_stream.async_shutdown(</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> as::bind_cancellation_slot(</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> sig-&gt;slot(),</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> as::consign(</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> force_move(self),</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> tim,</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> sig</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> )</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> )</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> );</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Self&gt;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">void</span> operator()(</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> Self&amp; self,</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_typedef" href="group__error.html#gaa100a3fca173f12e33f3b5711710033d">error_code</a> <span class="keyword">const</span>&amp; ec</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> ) {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> ASYNC_MQTT_LOG(<span class="stringliteral">&quot;mqtt_impl&quot;</span>, <a class="code hl_enumvalue" href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">info</a>)</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> &lt;&lt; <span class="stringliteral">&quot;TLS async_shutdown ec:&quot;</span> &lt;&lt; ec.message();</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> state = complete;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> self.complete(ec);</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> };</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>};</div>
</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span>} <span class="comment">// namespace async_mqtt</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="preprocessor">#endif </span><span class="comment">// ASYNC_MQTT_PREDEFINED_LAYER_CUSTOMIZED_SSL_STREAM_HPP</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>} <span class="comment">// namespace async_mqtt</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="preprocessor">#endif </span><span class="comment">// ASYNC_MQTT_PREDEFINED_LAYER_CUSTOMIZED_SSL_STREAM_HPP</span></div>
<div class="ttc" id="agroup__error_html_gaa100a3fca173f12e33f3b5711710033d"><div class="ttname"><a href="group__error.html#gaa100a3fca173f12e33f3b5711710033d">async_mqtt::error_code</a></div><div class="ttdeci">sys::error_code error_code</div><div class="ttdoc">sys is a namespace alias of boost::sytem.</div><div class="ttdef"><b>Definition</b> error.hpp:56</div></div>
<div class="ttc" id="agroup__log_html_gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c"><div class="ttname"><a href="group__log.html#gga3abd0c0ebf71c7d01def2a00423d1abfacaf9b6b99962bf5c2264824231d7a40c">async_mqtt::severity_level::info</a></div><div class="ttdeci">@ info</div><div class="ttdoc">info level api call is output</div></div>
<div class="ttc" id="astructasync__mqtt_1_1layer__customize_html"><div class="ttname"><a href="structasync__mqtt_1_1layer__customize.html">async_mqtt::layer_customize</a></div><div class="ttdoc">customization class template for underlying layer In order to adapt your layer to async_mqtt,...</div><div class="ttdef"><b>Definition</b> stream_traits.hpp:101</div></div>
Expand Down
Loading

0 comments on commit 58696ff

Please sign in to comment.