mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
deploy: 68286df23d
This commit is contained in:
@@ -95,120 +95,79 @@ $(function() {
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <ripple/beast/clock/abstract_clock.h></span></div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <ripple/beast/utility/Journal.h></span></div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <ripple/overlay/Peer.h></span></div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <boost/asio/basic_waitable_timer.hpp></span></div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/mutex.html">mutex</a>></span></div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/set.html">set</a>></span></div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html"> 48</a></span> <span class="keyword">class </span><a class="code" href="classripple_1_1PeerSet.html">PeerSet</a></div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> {</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">protected</span>:</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a90a3672f3016e5d1c6128061879ec41e"> 51</a></span>  <span class="keyword">using</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">ScopedLockType</a> = <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock<std::recursive_mutex></a>;</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="classripple_1_1PeerSet.html#a496be98fd2d19b2e01c9495c8ff3d069">PeerSet</a>(</div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="classripple_1_1Application.html">Application</a>& app,</div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>& hash,</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a> interval,</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="classbeast_1_1Journal.html">beast::Journal</a> journal);</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  </div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">virtual</span> <a class="code" href="classripple_1_1PeerSet.html#a22815d04e8927297736623dbfafa24a6">~PeerSet</a>() = 0;</div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <ripple/overlay/impl/ProtocolMessage.h></span></div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <boost/asio/basic_waitable_timer.hpp></span></div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/mutex.html">mutex</a>></span></div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/set.html">set</a>></span></div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  </div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html"> 44</a></span> <span class="keyword">class </span><a class="code" href="classripple_1_1PeerSet.html">PeerSet</a></div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> {</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">virtual</span> <a class="code" href="classripple_1_1PeerSet.html#aed73adc53a472315823d2386af51012b">~PeerSet</a>() = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="classripple_1_1PeerSet.html#a3ec0f2c9ea5c123121145dfc61388c12">addPeers</a>(</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> limit,</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a><<span class="keywordtype">bool</span>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>&)> hasItem,</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a><<span class="keywordtype">void</span>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>&)> onPeerAdded) = 0;</div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="classripple_1_1PeerSet.html#a4557b201391f7d1b5e11af49560ff3ee">addPeers</a>(</div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> limit,</div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a><<span class="keywordtype">bool</span>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>&)> score);</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  </div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="classripple_1_1PeerSet.html#a9ce55399eb28bc79e4397b7455af8aec">onPeerAdded</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>&) = 0;</div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classripple_1_1PeerSet.html#ac0416d2dcd2e5eb8801f55b03f4875e1">onTimer</a>(<span class="keywordtype">bool</span> progress, <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">ScopedLockType</a>&) = 0;</div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> MessageType></div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67"> 64</a></span>  <a class="code" href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67">sendRequest</a>(MessageType <span class="keyword">const</span>& message, <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>& peer)</div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  this-><a class="code" href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67">sendRequest</a>(message, <a class="code" href="namespaceripple.html#a26f911b45c375c0ef008c8c5e4416b02">protocolMessageType</a>(message), peer);</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <a class="code" href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67">sendRequest</a>(</div>
|
||||
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  ::google::protobuf::Message <span class="keyword">const</span>& message,</div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  protocol::MessageType type,</div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>& peer) = 0;</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  </div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <a class="code" href="classripple_1_1PeerSet.html#a46bc82ece5fd76d43a6206fa7714d13b">queueJob</a>() = 0;</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keyword">virtual</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/weak_ptr.html">std::weak_ptr<PeerSet></a></div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <a class="code" href="classripple_1_1PeerSet.html#af1c64f5cd21f67f9e232c42195aed820">pmDowncast</a>() = 0;</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  </div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordtype">bool</span></div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a92cd86e610ddc3c75bfa4a613dd42285"> 84</a></span>  <a class="code" href="classripple_1_1PeerSet.html#a92cd86e610ddc3c75bfa4a613dd42285">isDone</a>()<span class="keyword"> const</span></div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keyword"> </span>{</div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1PeerSet.html#a5e8e26a4201b05c805959c7fc909ec84">mComplete</a> || <a class="code" href="classripple_1_1PeerSet.html#a9a7d358bfb4c9ca39cbe143a270d6123">mFailed</a>;</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<Peer::id_t></a>&</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <a class="code" href="classripple_1_1PeerSet.html#acea4771f14e9825928b161d568c0911f">getPeerIds</a>() <span class="keyword">const</span> = 0;</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> };</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSetBuilder.html"> 80</a></span> <span class="keyword">class </span><a class="code" href="classripple_1_1PeerSetBuilder.html">PeerSetBuilder</a></div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> {</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keyword">virtual</span> <a class="code" href="classripple_1_1PeerSetBuilder.html#aca9dbf50fb60a340a3c3f7f49e9ed5fc">~PeerSetBuilder</a>() = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keyword">virtual</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<PeerSet></a></div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="classripple_1_1PeerSetBuilder.html#a9ac1880bf6c0cd73a12f5d08335c24c2">build</a>() = 0;</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> };</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  </div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="classripple_1_1PeerSet.html#af519e54b016eff0b244aceba65944e55">invokeOnTimer</a>();</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classripple_1_1PeerSet.html#abb0ae391c3b73fdb47a4bca7069b97f4">sendRequest</a>(</div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keyword">const</span> protocol::TMGetLedger& message,</div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Peer></a> <span class="keyword">const</span>& peer);</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="classripple_1_1PeerSet.html#addc5e94d9df5ad4a25e9afb735984cf3">setTimer</a>();</div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  </div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">// Used in this class for access to boost::asio::io_service and</span></div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="comment">// ripple::Overlay. Used in subtypes for the kitchen sink.</span></div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a706a011ba681781598055237f2d7fdaf"> 105</a></span>  <a class="code" href="classripple_1_1Application.html">Application</a>& <a class="code" href="classripple_1_1PeerSet.html#a706a011ba681781598055237f2d7fdaf">app_</a>;</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a63e0e407163a2e3f9fcd9135f519b5d1"> 106</a></span>  <a class="code" href="classbeast_1_1Journal.html">beast::Journal</a> <a class="code" href="classripple_1_1PeerSet.html#a63e0e407163a2e3f9fcd9135f519b5d1">m_journal</a>;</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#ab4fa0ea92f95d96e69d2149e23d02ea4"> 108</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/recursive_mutex.html">std::recursive_mutex</a> <a class="code" href="classripple_1_1PeerSet.html#ab4fa0ea92f95d96e69d2149e23d02ea4">mLock</a>;</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a0a79a33d6012ccbc0f7e21e561d8f113"> 112</a></span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span> <a class="code" href="classripple_1_1PeerSet.html#a0a79a33d6012ccbc0f7e21e561d8f113">mHash</a>;</div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#ae9b6f50ad29c4a6838652f98d5cca7e3"> 113</a></span>  <span class="keywordtype">int</span> <a class="code" href="classripple_1_1PeerSet.html#ae9b6f50ad29c4a6838652f98d5cca7e3">mTimeouts</a>;</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a5e8e26a4201b05c805959c7fc909ec84"> 114</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classripple_1_1PeerSet.html#a5e8e26a4201b05c805959c7fc909ec84">mComplete</a>;</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a9a7d358bfb4c9ca39cbe143a270d6123"> 115</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classripple_1_1PeerSet.html#a9a7d358bfb4c9ca39cbe143a270d6123">mFailed</a>;</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#ab291c226238498bf28b4ffad090b47e1"> 117</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classripple_1_1PeerSet.html#ab291c226238498bf28b4ffad090b47e1">mProgress</a>;</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  </div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a0652998669e63104bf8da3c0eafbe270"> 120</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<Peer::id_t></a> <a class="code" href="classripple_1_1PeerSet.html#a0652998669e63104bf8da3c0eafbe270">mPeers</a>;</div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  </div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#a6c83fd1c266d3fa99adb07d0075f201c"> 124</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a> <a class="code" href="classripple_1_1PeerSet.html#a6c83fd1c266d3fa99adb07d0075f201c">mTimerInterval</a>;</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="comment">// VFALCO TODO move the responsibility for the timer to a higher level</span></div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classripple_1_1PeerSet.html#afab2c5b6dc398605d06502c282f11b56"> 126</a></span>  boost::asio::basic_waitable_timer<std::chrono::steady_clock> <a class="code" href="classripple_1_1PeerSet.html#afab2c5b6dc398605d06502c282f11b56">mTimer</a>;</div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> };</div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> } <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<PeerSetBuilder></a></div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <a class="code" href="namespaceripple.html#a6d96d342f61e5dd48b86a8a37cdce642">make_PeerSetBuilder</a>(<a class="code" href="classripple_1_1Application.html">Application</a>& app);</div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<PeerSet></a></div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <a class="code" href="namespaceripple.html#a5a08ef41766731386ceb3ec0866c47d8">make_DummyPeerSet</a>(<a class="code" href="classripple_1_1Application.html">Application</a>& app);</div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> } <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  </div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="aclassripple_1_1Application_html"><div class="ttname"><a href="classripple_1_1Application.html">ripple::Application</a></div><div class="ttdef"><b>Definition:</b> <a href="Application_8h_source.html#l00101">Application.h:101</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a5a08ef41766731386ceb3ec0866c47d8"><div class="ttname"><a href="namespaceripple.html#a5a08ef41766731386ceb3ec0866c47d8">ripple::make_DummyPeerSet</a></div><div class="ttdeci">std::unique_ptr< PeerSet > make_DummyPeerSet(Application &app)</div><div class="ttdoc">Make a dummy PeerSet that does not do anything.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00187">PeerSet.cpp:187</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1Application_html"><div class="ttname"><a href="classripple_1_1Application.html">ripple::Application</a></div><div class="ttdef"><b>Definition:</b> <a href="Application_8h_source.html#l00102">Application.h:102</a></div></div>
|
||||
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_ac0416d2dcd2e5eb8801f55b03f4875e1"><div class="ttname"><a href="classripple_1_1PeerSet.html#ac0416d2dcd2e5eb8801f55b03f4875e1">ripple::PeerSet::onTimer</a></div><div class="ttdeci">virtual void onTimer(bool progress, ScopedLockType &)=0</div><div class="ttdoc">Hook called from invokeOnTimer().</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_ab291c226238498bf28b4ffad090b47e1"><div class="ttname"><a href="classripple_1_1PeerSet.html#ab291c226238498bf28b4ffad090b47e1">ripple::PeerSet::mProgress</a></div><div class="ttdeci">bool mProgress</div><div class="ttdoc">Whether forward progress has been made.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00117">PeerSet.h:117</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a92cd86e610ddc3c75bfa4a613dd42285"><div class="ttname"><a href="classripple_1_1PeerSet.html#a92cd86e610ddc3c75bfa4a613dd42285">ripple::PeerSet::isDone</a></div><div class="ttdeci">bool isDone() const</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00084">PeerSet.h:84</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_af519e54b016eff0b244aceba65944e55"><div class="ttname"><a href="classripple_1_1PeerSet.html#af519e54b016eff0b244aceba65944e55">ripple::PeerSet::invokeOnTimer</a></div><div class="ttdeci">void invokeOnTimer()</div><div class="ttdoc">Calls onTimer() if in the right state.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00101">PeerSet.cpp:101</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_afab2c5b6dc398605d06502c282f11b56"><div class="ttname"><a href="classripple_1_1PeerSet.html#afab2c5b6dc398605d06502c282f11b56">ripple::PeerSet::mTimer</a></div><div class="ttdeci">boost::asio::basic_waitable_timer< std::chrono::steady_clock > mTimer</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00126">PeerSet.h:126</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a0652998669e63104bf8da3c0eafbe270"><div class="ttname"><a href="classripple_1_1PeerSet.html#a0652998669e63104bf8da3c0eafbe270">ripple::PeerSet::mPeers</a></div><div class="ttdeci">std::set< Peer::id_t > mPeers</div><div class="ttdoc">The identifiers of the peers we are tracking.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00120">PeerSet.h:120</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::milliseconds</a></div></div>
|
||||
<div class="ttc" id="arecursive_mutex_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/recursive_mutex.html">std::recursive_mutex</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a5e8e26a4201b05c805959c7fc909ec84"><div class="ttname"><a href="classripple_1_1PeerSet.html#a5e8e26a4201b05c805959c7fc909ec84">ripple::PeerSet::mComplete</a></div><div class="ttdeci">bool mComplete</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00114">PeerSet.h:114</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_acea4771f14e9825928b161d568c0911f"><div class="ttname"><a href="classripple_1_1PeerSet.html#acea4771f14e9825928b161d568c0911f">ripple::PeerSet::getPeerIds</a></div><div class="ttdeci">virtual const std::set< Peer::id_t > & getPeerIds() const =0</div><div class="ttdoc">get the set of ids of previously added peers</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_1PeerSet_html_a46bc82ece5fd76d43a6206fa7714d13b"><div class="ttname"><a href="classripple_1_1PeerSet.html#a46bc82ece5fd76d43a6206fa7714d13b">ripple::PeerSet::queueJob</a></div><div class="ttdeci">virtual void queueJob()=0</div><div class="ttdoc">Queue a job to call invokeOnTimer().</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a4557b201391f7d1b5e11af49560ff3ee"><div class="ttname"><a href="classripple_1_1PeerSet.html#a4557b201391f7d1b5e11af49560ff3ee">ripple::PeerSet::addPeers</a></div><div class="ttdeci">void addPeers(std::size_t limit, std::function< bool(std::shared_ptr< Peer > const &)> score)</div><div class="ttdoc">Add at most limit peers to this set from the overlay.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00050">PeerSet.cpp:50</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a0a79a33d6012ccbc0f7e21e561d8f113"><div class="ttname"><a href="classripple_1_1PeerSet.html#a0a79a33d6012ccbc0f7e21e561d8f113">ripple::PeerSet::mHash</a></div><div class="ttdeci">const uint256 mHash</div><div class="ttdoc">The hash of the object (in practice, always a ledger) we are trying to fetch.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00112">PeerSet.h:112</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_abb0ae391c3b73fdb47a4bca7069b97f4"><div class="ttname"><a href="classripple_1_1PeerSet.html#abb0ae391c3b73fdb47a4bca7069b97f4">ripple::PeerSet::sendRequest</a></div><div class="ttdeci">void sendRequest(const protocol::TMGetLedger &message, std::shared_ptr< Peer > const &peer)</div><div class="ttdoc">Send a GetLedger message to one or all peers.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00127">PeerSet.cpp:127</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint< 256 ></a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a22815d04e8927297736623dbfafa24a6"><div class="ttname"><a href="classripple_1_1PeerSet.html#a22815d04e8927297736623dbfafa24a6">ripple::PeerSet::~PeerSet</a></div><div class="ttdeci">virtual ~PeerSet()=0</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a496be98fd2d19b2e01c9495c8ff3d069"><div class="ttname"><a href="classripple_1_1PeerSet.html#a496be98fd2d19b2e01c9495c8ff3d069">ripple::PeerSet::PeerSet</a></div><div class="ttdeci">PeerSet(Application &app, uint256 const &hash, std::chrono::milliseconds interval, beast::Journal journal)</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00029">PeerSet.cpp:29</a></div></div>
|
||||
<div class="ttc" id="aunique_lock_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock< std::recursive_mutex ></a></div></div>
|
||||
<div class="ttc" id="aclassbeast_1_1Journal_html"><div class="ttname"><a href="classbeast_1_1Journal.html">beast::Journal</a></div><div class="ttdoc">A generic endpoint for log messages.</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00058">Journal.h:58</a></div></div>
|
||||
<div class="ttc" id="aweak_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/weak_ptr.html">std::weak_ptr</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a751ba29d7fa5e1411ddd406e84f84d67"><div class="ttname"><a href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67">ripple::PeerSet::sendRequest</a></div><div class="ttdeci">void sendRequest(MessageType const &message, std::shared_ptr< Peer > const &peer)</div><div class="ttdoc">send a message</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00064">PeerSet.h:64</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSetBuilder_html"><div class="ttname"><a href="classripple_1_1PeerSetBuilder.html">ripple::PeerSetBuilder</a></div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00080">PeerSet.h:80</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a3ec0f2c9ea5c123121145dfc61388c12"><div class="ttname"><a href="classripple_1_1PeerSet.html#a3ec0f2c9ea5c123121145dfc61388c12">ripple::PeerSet::addPeers</a></div><div class="ttdeci">virtual void addPeers(std::size_t limit, std::function< bool(std::shared_ptr< Peer > const &)> hasItem, std::function< void(std::shared_ptr< Peer > const &)> onPeerAdded)=0</div><div class="ttdoc">Try add more peers.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_aed73adc53a472315823d2386af51012b"><div class="ttname"><a href="classripple_1_1PeerSet.html#aed73adc53a472315823d2386af51012b">ripple::PeerSet::~PeerSet</a></div><div class="ttdeci">virtual ~PeerSet()=default</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a26f911b45c375c0ef008c8c5e4416b02"><div class="ttname"><a href="namespaceripple.html#a26f911b45c375c0ef008c8c5e4416b02">ripple::protocolMessageType</a></div><div class="ttdeci">protocol::MessageType protocolMessageType(protocol::TMGetLedger const &)</div><div class="ttdef"><b>Definition:</b> <a href="ProtocolMessage_8h_source.html#l00042">ProtocolMessage.h:42</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="aclassripple_1_1PeerSet_html_a706a011ba681781598055237f2d7fdaf"><div class="ttname"><a href="classripple_1_1PeerSet.html#a706a011ba681781598055237f2d7fdaf">ripple::PeerSet::app_</a></div><div class="ttdeci">Application & app_</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00105">PeerSet.h:105</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html"><div class="ttname"><a href="classripple_1_1PeerSet.html">ripple::PeerSet</a></div><div class="ttdoc">Supports data retrieval by managing a set of peers.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00048">PeerSet.h:48</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a9a7d358bfb4c9ca39cbe143a270d6123"><div class="ttname"><a href="classripple_1_1PeerSet.html#a9a7d358bfb4c9ca39cbe143a270d6123">ripple::PeerSet::mFailed</a></div><div class="ttdeci">bool mFailed</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00115">PeerSet.h:115</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a9ce55399eb28bc79e4397b7455af8aec"><div class="ttname"><a href="classripple_1_1PeerSet.html#a9ce55399eb28bc79e4397b7455af8aec">ripple::PeerSet::onPeerAdded</a></div><div class="ttdeci">virtual void onPeerAdded(std::shared_ptr< Peer > const &)=0</div><div class="ttdoc">Hook called from addPeers().</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a6c83fd1c266d3fa99adb07d0075f201c"><div class="ttname"><a href="classripple_1_1PeerSet.html#a6c83fd1c266d3fa99adb07d0075f201c">ripple::PeerSet::mTimerInterval</a></div><div class="ttdeci">std::chrono::milliseconds mTimerInterval</div><div class="ttdoc">The minimum time to wait between calls to execute().</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00124">PeerSet.h:124</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a6d96d342f61e5dd48b86a8a37cdce642"><div class="ttname"><a href="namespaceripple.html#a6d96d342f61e5dd48b86a8a37cdce642">ripple::make_PeerSetBuilder</a></div><div class="ttdeci">std::unique_ptr< PeerSetBuilder > make_PeerSetBuilder(Application &app)</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00144">PeerSet.cpp:144</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html"><div class="ttname"><a href="classripple_1_1PeerSet.html">ripple::PeerSet</a></div><div class="ttdoc">Supports data retrieval by managing a set of peers.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00044">PeerSet.h:44</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSetBuilder_html_a9ac1880bf6c0cd73a12f5d08335c24c2"><div class="ttname"><a href="classripple_1_1PeerSetBuilder.html#a9ac1880bf6c0cd73a12f5d08335c24c2">ripple::PeerSetBuilder::build</a></div><div class="ttdeci">virtual std::unique_ptr< PeerSet > build()=0</div></div>
|
||||
<div class="ttc" id="amutex_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/mutex.html">mutex</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_a63e0e407163a2e3f9fcd9135f519b5d1"><div class="ttname"><a href="classripple_1_1PeerSet.html#a63e0e407163a2e3f9fcd9135f519b5d1">ripple::PeerSet::m_journal</a></div><div class="ttdeci">beast::Journal m_journal</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00106">PeerSet.h:106</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="aclassripple_1_1PeerSet_html_ae9b6f50ad29c4a6838652f98d5cca7e3"><div class="ttname"><a href="classripple_1_1PeerSet.html#ae9b6f50ad29c4a6838652f98d5cca7e3">ripple::PeerSet::mTimeouts</a></div><div class="ttdeci">int mTimeouts</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00113">PeerSet.h:113</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_af1c64f5cd21f67f9e232c42195aed820"><div class="ttname"><a href="classripple_1_1PeerSet.html#af1c64f5cd21f67f9e232c42195aed820">ripple::PeerSet::pmDowncast</a></div><div class="ttdeci">virtual std::weak_ptr< PeerSet > pmDowncast()=0</div><div class="ttdoc">Return a weak pointer to this.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_addc5e94d9df5ad4a25e9afb735984cf3"><div class="ttname"><a href="classripple_1_1PeerSet.html#addc5e94d9df5ad4a25e9afb735984cf3">ripple::PeerSet::setTimer</a></div><div class="ttdeci">void setTimer()</div><div class="ttdoc">Schedule a call to queueJob() after mTimerInterval.</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8cpp_source.html#l00087">PeerSet.cpp:87</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSetBuilder_html_aca9dbf50fb60a340a3c3f7f49e9ed5fc"><div class="ttname"><a href="classripple_1_1PeerSetBuilder.html#aca9dbf50fb60a340a3c3f7f49e9ed5fc">ripple::PeerSetBuilder::~PeerSetBuilder</a></div><div class="ttdeci">virtual ~PeerSetBuilder()=default</div></div>
|
||||
<div class="ttc" id="aunique_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aset_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/set.html">set</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerSet_html_ab4fa0ea92f95d96e69d2149e23d02ea4"><div class="ttname"><a href="classripple_1_1PeerSet.html#ab4fa0ea92f95d96e69d2149e23d02ea4">ripple::PeerSet::mLock</a></div><div class="ttdeci">std::recursive_mutex mLock</div><div class="ttdef"><b>Definition:</b> <a href="PeerSet_8h_source.html#l00108">PeerSet.h:108</a></div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||
|
||||
Reference in New Issue
Block a user