This commit is contained in:
bthomee
2025-08-19 09:49:50 -07:00
parent bb5efdeec8
commit e7f4ae8bed
14888 changed files with 259444 additions and 168566 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: Fixed.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -29,7 +29,7 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
@@ -46,6 +46,11 @@ $(function() {
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
@@ -103,22 +108,28 @@ $(function() {
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span>PeerFinder {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="foldopen" id="foldopen00029" data-start="{" data-end="};">
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html"> 29</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1PeerFinder_1_1Fixed.html">Fixed</a></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>{</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#af8c354a3d2ab4abffbaa30b6677e0e45"> 32</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classripple_1_1PeerFinder_1_1Fixed.html#af8c354a3d2ab4abffbaa30b6677e0e45">Fixed</a>(<a class="code hl_class" href="classbeast_1_1abstract__clock.html">clock_type</a>&amp; clock) : <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">m_when</a>(clock.now()), <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">m_failures</a>(0)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> }</div>
</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#abfc5ed99f8b318d9dc54e913dd8ff43e"> 36</a></span> <a class="code hl_function" href="classripple_1_1PeerFinder_1_1Fixed.html#abfc5ed99f8b318d9dc54e913dd8ff43e">Fixed</a>(<a class="code hl_class" href="classripple_1_1PeerFinder_1_1Fixed.html">Fixed</a> <span class="keyword">const</span>&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_typedef" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">clock_type::time_point</a> <span class="keyword">const</span>&amp;</div>
<div class="foldopen" id="foldopen00040" data-start="{" data-end="}">
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#a2453775b85f077716958a986698aea67"> 40</a></span> <a class="code hl_function" href="classripple_1_1PeerFinder_1_1Fixed.html#a2453775b85f077716958a986698aea67">when</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">m_when</a>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div>
</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00047" data-start="{" data-end="}">
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#ad2c4872213cb93da59d64f6374bdc66d"> 47</a></span> <a class="code hl_function" href="classripple_1_1PeerFinder_1_1Fixed.html#ad2c4872213cb93da59d64f6374bdc66d">failure</a>(<a class="code hl_typedef" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">clock_type::time_point</a> <span class="keyword">const</span>&amp; now)</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">m_failures</a> =</div>
@@ -126,42 +137,46 @@ $(function() {
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">m_when</a> =</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> now + <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::minutes</a>(<a class="code hl_variable" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ad46089ab9429a4c94c965ab519454410">Tuning::connectionBackoff</a>[<a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">m_failures</a>]);</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00057" data-start="{" data-end="}">
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#ad703ac09879fa69ca642ddaae44b3051"> 57</a></span> <a class="code hl_function" href="classripple_1_1PeerFinder_1_1Fixed.html#ad703ac09879fa69ca642ddaae44b3051">success</a>(<a class="code hl_typedef" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">clock_type::time_point</a> <span class="keyword">const</span>&amp; now)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">m_failures</a> = 0;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">m_when</a> = now;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab"> 64</a></span> <a class="code hl_typedef" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">clock_type::time_point</a> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">m_when</a>;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24"> 65</a></span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> <a class="code hl_variable" href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">m_failures</a>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>};</div>
</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>} <span class="comment">// namespace PeerFinder</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>} <span class="comment">// namespace ripple</span></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="preprocessor">#endif</span></div>
<div class="ttc" id="aclassbeast_1_1abstract__clock_html"><div class="ttname"><a href="classbeast_1_1abstract__clock.html">beast::abstract_clock&lt; std::chrono::steady_clock &gt;</a></div></div>
<div class="ttc" id="aclassbeast_1_1abstract__clock_html_a4e16832b0bdf9392c5138bbbde024d8e"><div class="ttname"><a href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">beast::abstract_clock&lt; std::chrono::steady_clock &gt;::time_point</a></div><div class="ttdeci">typename Clock::time_point time_point</div><div class="ttdef"><b>Definition:</b> <a href="abstract__clock_8h_source.html#l00060">abstract_clock.h:60</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html">ripple::PeerFinder::Fixed</a></div><div class="ttdoc">Metadata for a Fixed slot.</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00029">Fixed.h:30</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_a2453775b85f077716958a986698aea67"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#a2453775b85f077716958a986698aea67">ripple::PeerFinder::Fixed::when</a></div><div class="ttdeci">clock_type::time_point const &amp; when() const</div><div class="ttdoc">Returns the time after which we shoud allow a connection attempt.</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00040">Fixed.h:40</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_a46faebd61d3d45de66bb08c1384142ab"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">ripple::PeerFinder::Fixed::m_when</a></div><div class="ttdeci">clock_type::time_point m_when</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00064">Fixed.h:64</a></div></div>
<div class="ttc" id="aclassbeast_1_1abstract__clock_html_a4e16832b0bdf9392c5138bbbde024d8e"><div class="ttname"><a href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">beast::abstract_clock&lt; std::chrono::steady_clock &gt;::time_point</a></div><div class="ttdeci">typename Clock::time_point time_point</div><div class="ttdef"><b>Definition</b> <a href="abstract__clock_8h_source.html#l00060">abstract_clock.h:60</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html">ripple::PeerFinder::Fixed</a></div><div class="ttdoc">Metadata for a Fixed slot.</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00029">Fixed.h:30</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_a2453775b85f077716958a986698aea67"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#a2453775b85f077716958a986698aea67">ripple::PeerFinder::Fixed::when</a></div><div class="ttdeci">clock_type::time_point const &amp; when() const</div><div class="ttdoc">Returns the time after which we shoud allow a connection attempt.</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00040">Fixed.h:40</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_a46faebd61d3d45de66bb08c1384142ab"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#a46faebd61d3d45de66bb08c1384142ab">ripple::PeerFinder::Fixed::m_when</a></div><div class="ttdeci">clock_type::time_point m_when</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00064">Fixed.h:64</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_abfc5ed99f8b318d9dc54e913dd8ff43e"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#abfc5ed99f8b318d9dc54e913dd8ff43e">ripple::PeerFinder::Fixed::Fixed</a></div><div class="ttdeci">Fixed(Fixed const &amp;)=default</div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_ad2c4872213cb93da59d64f6374bdc66d"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#ad2c4872213cb93da59d64f6374bdc66d">ripple::PeerFinder::Fixed::failure</a></div><div class="ttdeci">void failure(clock_type::time_point const &amp;now)</div><div class="ttdoc">Updates metadata to reflect a failed connection.</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00047">Fixed.h:47</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_ad703ac09879fa69ca642ddaae44b3051"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#ad703ac09879fa69ca642ddaae44b3051">ripple::PeerFinder::Fixed::success</a></div><div class="ttdeci">void success(clock_type::time_point const &amp;now)</div><div class="ttdoc">Updates metadata to reflect a successful connection.</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00057">Fixed.h:57</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_ae79d8f907dbc172093445f68b051de24"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">ripple::PeerFinder::Fixed::m_failures</a></div><div class="ttdeci">std::size_t m_failures</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00065">Fixed.h:65</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_af8c354a3d2ab4abffbaa30b6677e0e45"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#af8c354a3d2ab4abffbaa30b6677e0e45">ripple::PeerFinder::Fixed::Fixed</a></div><div class="ttdeci">Fixed(clock_type &amp;clock)</div><div class="ttdef"><b>Definition:</b> <a href="Fixed_8h_source.html#l00032">Fixed.h:32</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_ad2c4872213cb93da59d64f6374bdc66d"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#ad2c4872213cb93da59d64f6374bdc66d">ripple::PeerFinder::Fixed::failure</a></div><div class="ttdeci">void failure(clock_type::time_point const &amp;now)</div><div class="ttdoc">Updates metadata to reflect a failed connection.</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00047">Fixed.h:47</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_ad703ac09879fa69ca642ddaae44b3051"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#ad703ac09879fa69ca642ddaae44b3051">ripple::PeerFinder::Fixed::success</a></div><div class="ttdeci">void success(clock_type::time_point const &amp;now)</div><div class="ttdoc">Updates metadata to reflect a successful connection.</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00057">Fixed.h:57</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_ae79d8f907dbc172093445f68b051de24"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#ae79d8f907dbc172093445f68b051de24">ripple::PeerFinder::Fixed::m_failures</a></div><div class="ttdeci">std::size_t m_failures</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00065">Fixed.h:65</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Fixed_html_af8c354a3d2ab4abffbaa30b6677e0e45"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Fixed.html#af8c354a3d2ab4abffbaa30b6677e0e45">ripple::PeerFinder::Fixed::Fixed</a></div><div class="ttdeci">Fixed(clock_type &amp;clock)</div><div class="ttdef"><b>Definition</b> <a href="Fixed_8h_source.html#l00032">Fixed.h:32</a></div></div>
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::minutes</a></div></div>
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_ad46089ab9429a4c94c965ab519454410"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ad46089ab9429a4c94c965ab519454410">ripple::PeerFinder::Tuning::connectionBackoff</a></div><div class="ttdeci">static std::array&lt; int, 10 &gt; const connectionBackoff</div><div class="ttdef"><b>Definition:</b> <a href="src_2xrpld_2peerfinder_2detail_2Tuning_8h_source.html#l00079">src/xrpld/peerfinder/detail/Tuning.h:79</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_ad46089ab9429a4c94c965ab519454410"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ad46089ab9429a4c94c965ab519454410">ripple::PeerFinder::Tuning::connectionBackoff</a></div><div class="ttdeci">static std::array&lt; int, 10 &gt; const connectionBackoff</div><div class="ttdef"><b>Definition</b> <a href="src_2xrpld_2peerfinder_2detail_2Tuning_8h_source.html#l00079">src/xrpld/peerfinder/detail/Tuning.h:79</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>