Files
rippled/PeerFinder__test_8cpp_source.html
2020-04-15 21:15:02 +00:00

291 lines
48 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: PeerFinder_test.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_120ed4da3e3217b1e7fc0b4f48568e79.html">test</a></li><li class="navelem"><a class="el" href="dir_e24a594a6c9cca0749bc2a5d77142cf2.html">peerfinder</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">PeerFinder_test.cpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//------------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> Copyright (c) 2012, 2013 Ripple Labs Inc.</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"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;ripple/basics/chrono.h&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;ripple/basics/Slice.h&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;ripple/protocol/PublicKey.h&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;ripple/protocol/SecretKey.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;ripple/peerfinder/impl/Logic.h&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;ripple/beast/unit_test.h&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;test/unit_test/SuiteJournal.h&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">namespace </span>PeerFinder {</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"><a class="line" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html"> 31</a></span>&#160;<span class="keyword">class </span><a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html">PeerFinder_test</a> : <span class="keyword">public</span> beast::unit_test::suite</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a19745a066cbfa830e576720b6f49c72d"> 33</a></span>&#160; <a class="code" href="classripple_1_1test_1_1SuiteJournal.html">test::SuiteJournal</a> <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a19745a066cbfa830e576720b6f49c72d">journal_</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a51b26946519747126b15c45586196699"> 36</a></span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a51b26946519747126b15c45586196699">PeerFinder_test</a>()</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; : <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a19745a066cbfa830e576720b6f49c72d">journal_</a> (<span class="stringliteral">&quot;PeerFinder_test&quot;</span>, *this)</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; { }</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html"> 40</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html">TestStore</a> : <a class="code" href="classripple_1_1PeerFinder_1_1Store.html">Store</a></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; {</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html#abc1cd4e1acc2137e736f52a4832337cb"> 43</a></span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html#abc1cd4e1acc2137e736f52a4832337cb">load</a> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">load_callback</a> <span class="keyword">const</span>&amp; cb)<span class="keyword"> override</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; }</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html#a1e9a1471fa34801c7683081d9855a1cb"> 49</a></span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html#a1e9a1471fa34801c7683081d9855a1cb">save</a> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector &lt;Entry&gt;</a> <span class="keyword">const</span>&amp;)<span class="keyword"> override</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; }</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; };</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html"> 54</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html">TestChecker</a></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; {</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#a51b6abf539757d8ae314ca162f33c3b1"> 57</a></span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#a51b6abf539757d8ae314ca162f33c3b1">stop</a>()</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; {</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; }</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#aeb6350e660f354999fe5d3d0ff29347e"> 62</a></span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#aeb6350e660f354999fe5d3d0ff29347e">wait</a>()</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; {</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; }</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> Handler&gt;</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#a379c9c31444d5d36db432ca740efff5a"> 68</a></span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#a379c9c31444d5d36db432ca740efff5a">async_connect</a> (<a class="code" href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a> <span class="keyword">const</span>&amp; ep,</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; Handler&amp;&amp; handler)</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; {</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; boost::system::error_code ec;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; handler (ep, ep, ec);</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; }</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; };</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#aacb058c28b2b1f87d689ccab25e35a51"> 77</a></span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#aacb058c28b2b1f87d689ccab25e35a51">test_backoff1</a>()</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; {</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> seconds = 10000;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; testcase(<span class="stringliteral">&quot;backoff 1&quot;</span>);</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html">TestStore</a> store;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html">TestChecker</a> checker;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="classbeast_1_1manual__clock.html">TestStopwatch</a> clock;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1Logic.html">Logic&lt;TestChecker&gt;</a> logic (clock, store, checker, <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a19745a066cbfa830e576720b6f49c72d">journal_</a>);</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#ae42e629c10d34bbacc989401fab3f720">addFixedPeer</a> (<span class="stringliteral">&quot;test&quot;</span>,</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="classbeast_1_1IP_1_1Endpoint.html#ab2c227db84255620219ebab8ead53636">beast::IP::Endpoint::from_string</a>(<span class="stringliteral">&quot;65.0.0.1:5&quot;</span>));</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; {</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1Config.html">Config</a> c;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; c.<a class="code" href="structripple_1_1PeerFinder_1_1Config.html#a2aa0119410e7741efd384492c1e5a3b9">autoConnect</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; c.<a class="code" href="structripple_1_1PeerFinder_1_1Config.html#af8629cfefba4fb74f5a498562eddc06b">listeningPort</a> = 1024;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#af9caa5f123b38c830b535f1d64b810dc">config</a>(c);</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; }</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> n = 0;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordflow">for</span> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> i = 0; i &lt; seconds; ++i)</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; {</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> list = logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a298da7ca55032f40d03ba37e718c5727">autoconnect</a>();</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordflow">if</span> (! list.empty())</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; {</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; BEAST_EXPECT(list.size() == 1);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> slot = logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a524bda7c8324afe795d90f6e408a495b">new_outbound_slot</a>(list.front());</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; BEAST_EXPECT(logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a26436b866efc1f7f761b13385a13e2e2">onConnected</a>(slot,</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="code" href="classbeast_1_1IP_1_1Endpoint.html#ab2c227db84255620219ebab8ead53636">beast::IP::Endpoint::from_string</a>(<span class="stringliteral">&quot;65.0.0.2:5&quot;</span>)));</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a31f8cf137e2aa6e827f49bee762591a3">on_closed</a>(slot);</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; ++n;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; }</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; clock.advance(<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>(1));</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#aa8c245c6a86c024ccafc1b4bb7d57592">once_per_second</a>();</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; }</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// Less than 20 attempts</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; BEAST_EXPECT(n &lt; 20);</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; }</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="comment">// with activate</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#ae54a1c9146f30ae22d86d9898bd5ff78"> 115</a></span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#ae54a1c9146f30ae22d86d9898bd5ff78">test_backoff2</a>()</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; {</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> seconds = 10000;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; testcase(<span class="stringliteral">&quot;backoff 2&quot;</span>);</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html">TestStore</a> store;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html">TestChecker</a> checker;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <a class="code" href="classbeast_1_1manual__clock.html">TestStopwatch</a> clock;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1Logic.html">Logic&lt;TestChecker&gt;</a> logic (clock, store, checker, <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a19745a066cbfa830e576720b6f49c72d">journal_</a>);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#ae42e629c10d34bbacc989401fab3f720">addFixedPeer</a> (<span class="stringliteral">&quot;test&quot;</span>,</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="classbeast_1_1IP_1_1Endpoint.html#ab2c227db84255620219ebab8ead53636">beast::IP::Endpoint::from_string</a>(<span class="stringliteral">&quot;65.0.0.1:5&quot;</span>));</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; {</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="structripple_1_1PeerFinder_1_1Config.html">Config</a> c;</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; c.<a class="code" href="structripple_1_1PeerFinder_1_1Config.html#a2aa0119410e7741efd384492c1e5a3b9">autoConnect</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; c.<a class="code" href="structripple_1_1PeerFinder_1_1Config.html#af8629cfefba4fb74f5a498562eddc06b">listeningPort</a> = 1024;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#af9caa5f123b38c830b535f1d64b810dc">config</a>(c);</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; }</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <a class="code" href="classripple_1_1PublicKey.html">PublicKey</a> <span class="keyword">const</span> pk (<a class="code" href="namespaceripple.html#ac52a0a522fc11bdd47fce39bd29f97bc">randomKeyPair</a>(<a class="code" href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757">KeyType::secp256k1</a>).first);</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> n = 0;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">for</span> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> i = 0; i &lt; seconds; ++i)</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; {</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> list = logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a298da7ca55032f40d03ba37e718c5727">autoconnect</a>();</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordflow">if</span> (! list.empty())</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; {</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; BEAST_EXPECT(list.size() == 1);</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> slot = logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a524bda7c8324afe795d90f6e408a495b">new_outbound_slot</a>(list.front());</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">if</span> (! BEAST_EXPECT(logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a26436b866efc1f7f761b13385a13e2e2">onConnected</a>(slot,</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <a class="code" href="classbeast_1_1IP_1_1Endpoint.html#ab2c227db84255620219ebab8ead53636">beast::IP::Endpoint::from_string</a>(<span class="stringliteral">&quot;65.0.0.2:5&quot;</span>))))</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s = <span class="stringliteral">&quot;.&quot;</span>;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">if</span> (! BEAST_EXPECT(logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a596f7cc512ca9c9aa0ffe39a9e3959e7">activate</a>(slot, pk, <span class="keyword">false</span>) ==</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="namespaceripple_1_1PeerFinder.html#ae15e107cb3b0b67dbf43bd4a0a229c15a260ca9dd8a4577fc00b7bd5810298076">PeerFinder::Result::success</a>))</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#a31f8cf137e2aa6e827f49bee762591a3">on_closed</a>(slot);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; ++n;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; }</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; clock.advance(<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>(1));</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; logic.<a class="code" href="classripple_1_1PeerFinder_1_1Logic.html#aa8c245c6a86c024ccafc1b4bb7d57592">once_per_second</a>();</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; }</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="comment">// No more often than once per minute</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; BEAST_EXPECT(n &lt;= (seconds+59)/60);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; }</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#acfb146a146f2270acaf27704dfaa8848"> 159</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#acfb146a146f2270acaf27704dfaa8848">run</a> ()<span class="keyword"> override</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#aacb058c28b2b1f87d689ccab25e35a51">test_backoff1</a>();</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="code" href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#ae54a1c9146f30ae22d86d9898bd5ff78">test_backoff2</a>();</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;};</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;<a class="code" href="namespaceripple_1_1PeerFinder.html#ac3c15f60e1dce2498257f35081a29cbf">BEAST_DEFINE_TESTSUITE</a>(PeerFinder,PeerFinder,<a class="code" href="namespaceripple.html">ripple</a>);</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;}</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore_html_a1e9a1471fa34801c7683081d9855a1cb"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html#a1e9a1471fa34801c7683081d9855a1cb">ripple::PeerFinder::PeerFinder_test::TestStore::save</a></div><div class="ttdeci">void save(std::vector&lt; Entry &gt; const &amp;) override</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00049">PeerFinder_test.cpp:49</a></div></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html">ripple::PeerFinder::Logic</a></div><div class="ttdoc">The Logic for maintaining the list of Slot addresses.</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00054">peerfinder/impl/Logic.h:54</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1PeerFinder__test_html"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1PeerFinder__test.html">ripple::PeerFinder::PeerFinder_test</a></div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00031">PeerFinder_test.cpp:31</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_a524bda7c8324afe795d90f6e408a495b"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#a524bda7c8324afe795d90f6e408a495b">ripple::PeerFinder::Logic::new_outbound_slot</a></div><div class="ttdeci">SlotImp::ptr new_outbound_slot(beast::IP::Endpoint const &amp;remote_endpoint)</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00300">peerfinder/impl/Logic.h:300</a></div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1PeerFinder__test_html_a19745a066cbfa830e576720b6f49c72d"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a19745a066cbfa830e576720b6f49c72d">ripple::PeerFinder::PeerFinder_test::journal_</a></div><div class="ttdeci">test::SuiteJournal journal_</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00033">PeerFinder_test.cpp:33</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker_html"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html">ripple::PeerFinder::PeerFinder_test::TestChecker</a></div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00054">PeerFinder_test.cpp:54</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker_html_aeb6350e660f354999fe5d3d0ff29347e"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#aeb6350e660f354999fe5d3d0ff29347e">ripple::PeerFinder::PeerFinder_test::TestChecker::wait</a></div><div class="ttdeci">void wait()</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00062">PeerFinder_test.cpp:62</a></div></div>
<div class="ttc" id="afunction_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Store_html"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Store.html">ripple::PeerFinder::Store</a></div><div class="ttdoc">Abstract persistence for PeerFinder data.</div><div class="ttdef"><b>Definition:</b> <a href="Store_8h_source.html#l00027">Store.h:27</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore_html"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html">ripple::PeerFinder::PeerFinder_test::TestStore</a></div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00040">PeerFinder_test.cpp:40</a></div></div>
<div class="ttc" id="anamespaceripple_1_1PeerFinder_html_ae15e107cb3b0b67dbf43bd4a0a229c15a260ca9dd8a4577fc00b7bd5810298076"><div class="ttname"><a href="namespaceripple_1_1PeerFinder.html#ae15e107cb3b0b67dbf43bd4a0a229c15a260ca9dd8a4577fc00b7bd5810298076">ripple::PeerFinder::Result::success</a></div><div class="ttdeci">@ success</div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_a26436b866efc1f7f761b13385a13e2e2"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#a26436b866efc1f7f761b13385a13e2e2">ripple::PeerFinder::Logic::onConnected</a></div><div class="ttdeci">bool onConnected(SlotImp::ptr const &amp;slot, beast::IP::Endpoint const &amp;local_endpoint)</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00338">peerfinder/impl/Logic.h:338</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker_html_a51b6abf539757d8ae314ca162f33c3b1"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#a51b6abf539757d8ae314ca162f33c3b1">ripple::PeerFinder::PeerFinder_test::TestChecker::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00057">PeerFinder_test.cpp:57</a></div></div>
<div class="ttc" id="aclassripple_1_1PublicKey_html"><div class="ttname"><a href="classripple_1_1PublicKey.html">ripple::PublicKey</a></div><div class="ttdoc">A public key.</div><div class="ttdef"><b>Definition:</b> <a href="PublicKey_8h_source.html#l00059">PublicKey.h:59</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1PeerFinder__test_html_a51b26946519747126b15c45586196699"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#a51b26946519747126b15c45586196699">ripple::PeerFinder::PeerFinder_test::PeerFinder_test</a></div><div class="ttdeci">PeerFinder_test()</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00036">PeerFinder_test.cpp:36</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1PeerFinder__test_html_ae54a1c9146f30ae22d86d9898bd5ff78"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#ae54a1c9146f30ae22d86d9898bd5ff78">ripple::PeerFinder::PeerFinder_test::test_backoff2</a></div><div class="ttdeci">void test_backoff2()</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00115">PeerFinder_test.cpp:115</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_a298da7ca55032f40d03ba37e718c5727"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#a298da7ca55032f40d03ba37e718c5727">ripple::PeerFinder::Logic::autoconnect</a></div><div class="ttdeci">std::vector&lt; beast::IP::Endpoint &gt; autoconnect()</div><div class="ttdoc">Create new outbound connection attempts as needed.</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00464">peerfinder/impl/Logic.h:464</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_ae42e629c10d34bbacc989401fab3f720"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#ae42e629c10d34bbacc989401fab3f720">ripple::PeerFinder::Logic::addFixedPeer</a></div><div class="ttdeci">void addFixedPeer(std::string const &amp;name, beast::IP::Endpoint const &amp;ep)</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00170">peerfinder/impl/Logic.h:170</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_a596f7cc512ca9c9aa0ffe39a9e3959e7"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#a596f7cc512ca9c9aa0ffe39a9e3959e7">ripple::PeerFinder::Logic::activate</a></div><div class="ttdeci">Result activate(SlotImp::ptr const &amp;slot, PublicKey const &amp;key, bool reserved)</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00375">peerfinder/impl/Logic.h:375</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker_html_a379c9c31444d5d36db432ca740efff5a"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestChecker.html#a379c9c31444d5d36db432ca740efff5a">ripple::PeerFinder::PeerFinder_test::TestChecker::async_connect</a></div><div class="ttdeci">void async_connect(beast::IP::Endpoint const &amp;ep, Handler &amp;&amp;handler)</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00068">PeerFinder_test.cpp:68</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1SuiteJournal_html"><div class="ttname"><a href="classripple_1_1test_1_1SuiteJournal.html">ripple::test::SuiteJournal</a></div><div class="ttdef"><b>Definition:</b> <a href="SuiteJournal_8h_source.html#l00081">SuiteJournal.h:81</a></div></div>
<div class="ttc" id="anamespaceripple_html_a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757"><div class="ttname"><a href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757">ripple::KeyType::secp256k1</a></div><div class="ttdeci">@ secp256k1</div></div>
<div class="ttc" id="anamespaceripple_html_ac52a0a522fc11bdd47fce39bd29f97bc"><div class="ttname"><a href="namespaceripple.html#ac52a0a522fc11bdd47fce39bd29f97bc">ripple::randomKeyPair</a></div><div class="ttdeci">std::pair&lt; PublicKey, SecretKey &gt; randomKeyPair(KeyType type)</div><div class="ttdoc">Create a key pair using secure random numbers.</div><div class="ttdef"><b>Definition:</b> <a href="SecretKey_8cpp_source.html#l00286">SecretKey.cpp:286</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_aa8c245c6a86c024ccafc1b4bb7d57592"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#aa8c245c6a86c024ccafc1b4bb7d57592">ripple::PeerFinder::Logic::once_per_second</a></div><div class="ttdeci">void once_per_second()</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00664">peerfinder/impl/Logic.h:664</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="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1Config_html_af8629cfefba4fb74f5a498562eddc06b"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1Config.html#af8629cfefba4fb74f5a498562eddc06b">ripple::PeerFinder::Config::listeningPort</a></div><div class="ttdeci">std::uint16_t listeningPort</div><div class="ttdoc">The listening port number.</div><div class="ttdef"><b>Definition:</b> <a href="PeerfinderManager_8h_source.html#l00070">PeerfinderManager.h:70</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1PeerFinder__test_html_acfb146a146f2270acaf27704dfaa8848"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#acfb146a146f2270acaf27704dfaa8848">ripple::PeerFinder::PeerFinder_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00159">PeerFinder_test.cpp:159</a></div></div>
<div class="ttc" id="aclassbeast_1_1IP_1_1Endpoint_html_ab2c227db84255620219ebab8ead53636"><div class="ttname"><a href="classbeast_1_1IP_1_1Endpoint.html#ab2c227db84255620219ebab8ead53636">beast::IP::Endpoint::from_string</a></div><div class="ttdeci">static Endpoint from_string(std::string const &amp;s)</div><div class="ttdef"><b>Definition:</b> <a href="IPEndpoint_8cpp_source.html#l00047">IPEndpoint.cpp:47</a></div></div>
<div class="ttc" id="anamespaceripple_1_1PeerFinder_html_ac3c15f60e1dce2498257f35081a29cbf"><div class="ttname"><a href="namespaceripple_1_1PeerFinder.html#ac3c15f60e1dce2498257f35081a29cbf">ripple::PeerFinder::BEAST_DEFINE_TESTSUITE</a></div><div class="ttdeci">BEAST_DEFINE_TESTSUITE(Livecache, peerfinder, ripple)</div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1PeerFinder__test_html_aacb058c28b2b1f87d689ccab25e35a51"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1PeerFinder__test.html#aacb058c28b2b1f87d689ccab25e35a51">ripple::PeerFinder::PeerFinder_test::test_backoff1</a></div><div class="ttdeci">void test_backoff1()</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00077">PeerFinder_test.cpp:77</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 class="ttc" id="aclassbeast_1_1IP_1_1Endpoint_html"><div class="ttname"><a href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a></div><div class="ttdoc">A version-independent IP address and port combination.</div><div class="ttdef"><b>Definition:</b> <a href="IPEndpoint_8h_source.html#l00039">IPEndpoint.h:39</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1Config_html_a2aa0119410e7741efd384492c1e5a3b9"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1Config.html#a2aa0119410e7741efd384492c1e5a3b9">ripple::PeerFinder::Config::autoConnect</a></div><div class="ttdeci">bool autoConnect</div><div class="ttdoc">true if we want to establish connections automatically</div><div class="ttdef"><b>Definition:</b> <a href="PeerfinderManager_8h_source.html#l00067">PeerfinderManager.h:67</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1Config_html"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1Config.html">ripple::PeerFinder::Config</a></div><div class="ttdoc">PeerFinder configuration settings.</div><div class="ttdef"><b>Definition:</b> <a href="PeerfinderManager_8h_source.html#l00040">PeerfinderManager.h:40</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_a31f8cf137e2aa6e827f49bee762591a3"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#a31f8cf137e2aa6e827f49bee762591a3">ripple::PeerFinder::Logic::on_closed</a></div><div class="ttdeci">void on_closed(SlotImp::ptr const &amp;slot)</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00861">peerfinder/impl/Logic.h:861</a></div></div>
<div class="ttc" id="aclassbeast_1_1manual__clock_html"><div class="ttname"><a href="classbeast_1_1manual__clock.html">beast::manual_clock&lt; std::chrono::steady_clock &gt;</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Logic_html_af9caa5f123b38c830b535f1d64b810dc"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Logic.html#af9caa5f123b38c830b535f1d64b810dc">ripple::PeerFinder::Logic::config</a></div><div class="ttdeci">void config(Config const &amp;c)</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Logic_8h_source.html#l00155">peerfinder/impl/Logic.h:155</a></div></div>
<div class="ttc" id="astructripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore_html_abc1cd4e1acc2137e736f52a4832337cb"><div class="ttname"><a href="structripple_1_1PeerFinder_1_1PeerFinder__test_1_1TestStore.html#abc1cd4e1acc2137e736f52a4832337cb">ripple::PeerFinder::PeerFinder_test::TestStore::load</a></div><div class="ttdeci">std::size_t load(load_callback const &amp;cb) override</div><div class="ttdef"><b>Definition:</b> <a href="PeerFinder__test_8cpp_source.html#l00043">PeerFinder_test.cpp:43</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>