mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 15:35:50 +00:00
deploy: bd3bc917f8
This commit is contained in:
@@ -362,384 +362,384 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> remote_endpoint.address(),</div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>);</div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> </div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> {</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> <span class="comment">// The node gets a reserved slot if it is in our cluster</span></div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> <span class="comment">// or if it has a reservation.</span></div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="keywordtype">bool</span> <span class="keyword">const</span> reserved =</div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#ac21347e29987cc9b6cefb846bb8a3ae1">cluster</a>().<a class="code hl_function" href="classripple_1_1Cluster.html#adffcdc10e28e4fa6f3e9b9c5f4bb3afa">member</a>(publicKey)) ||</div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#abe7dea7651a425eeeba986c941a0fbf6">peerReservations</a>().<a class="code hl_function" href="classripple_1_1PeerReservationTable.html#a798360d75065f1106fbe581af2381599">contains</a>(publicKey);</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keyword">auto</span> <span class="keyword">const</span> result =</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->activate(slot, publicKey, reserved);</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordflow">if</span> (result != PeerFinder::Result::success)</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> {</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->on_closed(slot);</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> JLOG(journal.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"Peer "</span> << remote_endpoint</div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> << <span class="stringliteral">" redirected, "</span> << <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(result);</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#aaa0aa2a937dec4a692870365b7a4ad3d">moved</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a808daa7fd8b0b6f64aec56b83ce5fe85">response</a> = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2">makeRedirectResponse</a>(</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> slot, request, remote_endpoint.address());</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a1200155ab6c4ac3ba14702a950c363cf">keep_alive</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="keywordflow">return</span> handoff;</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> }</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> }</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> </div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keyword">auto</span> <span class="keyword">const</span> peer = <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<PeerImp></a>(</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>,</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordtype">id</span>,</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> slot,</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> std::move(request),</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> publicKey,</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> *negotiatedVersion,</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> consumer,</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> std::move(stream_ptr),</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> *<span class="keyword">this</span>);</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> {</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="comment">// As we are not on the strand, run() must be called</span></div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="comment">// while holding the lock, otherwise new I/O can be</span></div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="comment">// queued after a call to stop().</span></div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a><<span class="keyword">decltype</span>(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>)> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> {</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.emplace(peer->slot(), peer);</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> result.second,</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="stringliteral">"ripple::OverlayImpl::onHandoff : peer is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> }</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(peer.get(), peer);</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> </div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> peer->run();</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> }</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#aaa0aa2a937dec4a692870365b7a4ad3d">moved</a> = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="keywordflow">return</span> handoff;</div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> }</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="keywordflow">catch</span> (<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a> <span class="keyword">const</span>& e)</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> {</div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> JLOG(journal.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"Peer "</span> << remote_endpoint</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> << <span class="stringliteral">" fails handshake ("</span> << e.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>() << <span class="stringliteral">")"</span>;</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->on_closed(slot);</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#aaa0aa2a937dec4a692870365b7a4ad3d">moved</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a808daa7fd8b0b6f64aec56b83ce5fe85">response</a> = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d">makeErrorResponse</a>(</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> slot, request, remote_endpoint.address(), e.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>());</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a1200155ab6c4ac3ba14702a950c363cf">keep_alive</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> <span class="keywordflow">return</span> handoff;</div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> }</div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span>}</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> consumer.setPublicKey(publicKey);</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> </div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> {</div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="comment">// The node gets a reserved slot if it is in our cluster</span></div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="comment">// or if it has a reservation.</span></div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordtype">bool</span> <span class="keyword">const</span> reserved =</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#ac21347e29987cc9b6cefb846bb8a3ae1">cluster</a>().<a class="code hl_function" href="classripple_1_1Cluster.html#adffcdc10e28e4fa6f3e9b9c5f4bb3afa">member</a>(publicKey)) ||</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#abe7dea7651a425eeeba986c941a0fbf6">peerReservations</a>().<a class="code hl_function" href="classripple_1_1PeerReservationTable.html#a798360d75065f1106fbe581af2381599">contains</a>(publicKey);</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keyword">auto</span> <span class="keyword">const</span> result =</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->activate(slot, publicKey, reserved);</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="keywordflow">if</span> (result != PeerFinder::Result::success)</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> {</div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->on_closed(slot);</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> JLOG(journal.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"Peer "</span> << remote_endpoint</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> << <span class="stringliteral">" redirected, "</span> << <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(result);</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#aaa0aa2a937dec4a692870365b7a4ad3d">moved</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a808daa7fd8b0b6f64aec56b83ce5fe85">response</a> = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2">makeRedirectResponse</a>(</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> slot, request, remote_endpoint.address());</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a1200155ab6c4ac3ba14702a950c363cf">keep_alive</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="keywordflow">return</span> handoff;</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> }</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> </div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keyword">auto</span> <span class="keyword">const</span> peer = <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<PeerImp></a>(</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>,</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordtype">id</span>,</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> slot,</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> std::move(request),</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> publicKey,</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> *negotiatedVersion,</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> consumer,</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> std::move(stream_ptr),</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> *<span class="keyword">this</span>);</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> {</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="comment">// As we are not on the strand, run() must be called</span></div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <span class="comment">// while holding the lock, otherwise new I/O can be</span></div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="comment">// queued after a call to stop().</span></div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a><<span class="keyword">decltype</span>(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>)> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> {</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.emplace(peer->slot(), peer);</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> result.second,</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="stringliteral">"ripple::OverlayImpl::onHandoff : peer is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> }</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(peer.get(), peer);</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> </div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> peer->run();</div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> }</div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#aaa0aa2a937dec4a692870365b7a4ad3d">moved</a> = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="keywordflow">return</span> handoff;</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> }</div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordflow">catch</span> (<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a> <span class="keyword">const</span>& e)</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> {</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> JLOG(journal.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"Peer "</span> << remote_endpoint</div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> << <span class="stringliteral">" fails handshake ("</span> << e.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>() << <span class="stringliteral">")"</span>;</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> </div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->on_closed(slot);</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#aaa0aa2a937dec4a692870365b7a4ad3d">moved</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a808daa7fd8b0b6f64aec56b83ce5fe85">response</a> = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d">makeErrorResponse</a>(</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> slot, request, remote_endpoint.address(), e.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>());</div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> handoff.<a class="code hl_variable" href="structripple_1_1Handoff.html#a1200155ab6c4ac3ba14702a950c363cf">keep_alive</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <span class="keywordflow">return</span> handoff;</div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> }</div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> </div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span><span class="keywordtype">bool</span></div>
|
||||
<div class="foldopen" id="foldopen00332" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#abcf430bc5f040cff77dd77b7c56a652f"> 332</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#abcf430bc5f040cff77dd77b7c56a652f">OverlayImpl::isPeerUpgrade</a>(<a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>& request)</div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span>{</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classripple_1_1OverlayImpl.html#a1857a64f0516de9ed62deea84574ced5">is_upgrade</a>(request))</div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keyword">auto</span> <span class="keyword">const</span> versions = <a class="code hl_function" href="namespaceripple.html#a217d4fd0d78a4f83214976e1b25f31eb">parseProtocolVersions</a>(request[<span class="stringliteral">"Upgrade"</span>]);</div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="keywordflow">return</span> !versions.empty();</div>
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span>}</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> </div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span><span class="keywordtype">bool</span></div>
|
||||
<div class="foldopen" id="foldopen00334" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#abcf430bc5f040cff77dd77b7c56a652f"> 334</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#abcf430bc5f040cff77dd77b7c56a652f">OverlayImpl::isPeerUpgrade</a>(<a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>& request)</div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span>{</div>
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classripple_1_1OverlayImpl.html#a1857a64f0516de9ed62deea84574ced5">is_upgrade</a>(request))</div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> <span class="keyword">auto</span> <span class="keyword">const</span> versions = <a class="code hl_function" href="namespaceripple.html#a217d4fd0d78a4f83214976e1b25f31eb">parseProtocolVersions</a>(request[<span class="stringliteral">"Upgrade"</span>]);</div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> <span class="keywordflow">return</span> !versions.empty();</div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> </div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
|
||||
<div class="foldopen" id="foldopen00341" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a0888985ab827a3df0e079496a8918740"> 341</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a0888985ab827a3df0e079496a8918740">OverlayImpl::makePrefix</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> <span class="keywordtype">id</span>)</div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span>{</div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream.html">std::stringstream</a> ss;</div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> ss << <span class="stringliteral">"["</span> << <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/manip/setfill.html">std::setfill</a>(<span class="charliteral">'0'</span>) << <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/manip/setw.html">std::setw</a>(3) << <span class="keywordtype">id</span> << <span class="stringliteral">"] "</span>;</div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="keywordflow">return</span> ss.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream/str.html">str</a>();</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span>}</div>
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> </div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
|
||||
<div class="foldopen" id="foldopen00343" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a0888985ab827a3df0e079496a8918740"> 343</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a0888985ab827a3df0e079496a8918740">OverlayImpl::makePrefix</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> <span class="keywordtype">id</span>)</div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span>{</div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream.html">std::stringstream</a> ss;</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> ss << <span class="stringliteral">"["</span> << <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/manip/setfill.html">std::setfill</a>(<span class="charliteral">'0'</span>) << <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/manip/setw.html">std::setw</a>(3) << <span class="keywordtype">id</span> << <span class="stringliteral">"] "</span>;</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <span class="keywordflow">return</span> ss.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream/str.html">str</a>();</div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> </div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Writer></a></div>
|
||||
<div class="foldopen" id="foldopen00349" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2"> 349</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2">OverlayImpl::makeRedirectResponse</a>(</div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& slot,</div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>& request,</div>
|
||||
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <a class="code hl_typedef" href="classripple_1_1OverlayImpl.html#a0d015fc3cac2f60d841c915eacc025e0">address_type</a> remote_address)</div>
|
||||
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span>{</div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> boost::beast::http::response<json_body> msg;</div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> msg.version(request.version());</div>
|
||||
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> msg.result(boost::beast::http::status::service_unavailable);</div>
|
||||
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> msg.insert(<span class="stringliteral">"Server"</span>, <a class="code hl_function" href="namespaceripple_1_1BuildInfo.html#a1e2b1646cf948c1c19ff190903c3e789">BuildInfo::getFullVersionString</a>());</div>
|
||||
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> {</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/io/basic_ostringstream.html">std::ostringstream</a> ostr;</div>
|
||||
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> ostr << remote_address;</div>
|
||||
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> msg.insert(<span class="stringliteral">"Remote-Address"</span>, ostr.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/basic_ostringstream/str.html">str</a>());</div>
|
||||
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> }</div>
|
||||
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> msg.insert(<span class="stringliteral">"Content-Type"</span>, <span class="stringliteral">"application/json"</span>);</div>
|
||||
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> msg.insert(boost::beast::http::field::connection, <span class="stringliteral">"close"</span>);</div>
|
||||
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> msg.body() = <a class="code hl_enumvalue" href="namespaceJson.html#a7d654b75c16a57007925868e38212b4eae8386dcfc36d1ae897745f7b4f77a1f6">Json::objectValue</a>;</div>
|
||||
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> {</div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a>& ips = (msg.body()[<span class="stringliteral">"peer-ips"</span>] = <a class="code hl_enumvalue" href="namespaceJson.html#a7d654b75c16a57007925868e38212b4eadc8f264f36b55b063c78126b335415f4">Json::arrayValue</a>);</div>
|
||||
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& _ : <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->redirect(slot))</div>
|
||||
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> ips.<a class="code hl_function" href="classJson_1_1Value.html#a21526b61dea2a1771030473e6248621e">append</a>(_.address.to_string());</div>
|
||||
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> }</div>
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> msg.prepare_payload();</div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="keywordflow">return</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<SimpleWriter></a>(msg);</div>
|
||||
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span>}</div>
|
||||
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> </div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Writer></a></div>
|
||||
<div class="foldopen" id="foldopen00351" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2"> 351</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2">OverlayImpl::makeRedirectResponse</a>(</div>
|
||||
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& slot,</div>
|
||||
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>& request,</div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> <a class="code hl_typedef" href="classripple_1_1OverlayImpl.html#a0d015fc3cac2f60d841c915eacc025e0">address_type</a> remote_address)</div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span>{</div>
|
||||
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> boost::beast::http::response<json_body> msg;</div>
|
||||
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> msg.version(request.version());</div>
|
||||
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> msg.result(boost::beast::http::status::service_unavailable);</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> msg.insert(<span class="stringliteral">"Server"</span>, <a class="code hl_function" href="namespaceripple_1_1BuildInfo.html#a1e2b1646cf948c1c19ff190903c3e789">BuildInfo::getFullVersionString</a>());</div>
|
||||
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> {</div>
|
||||
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/io/basic_ostringstream.html">std::ostringstream</a> ostr;</div>
|
||||
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> ostr << remote_address;</div>
|
||||
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> msg.insert(<span class="stringliteral">"Remote-Address"</span>, ostr.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/io/basic_ostringstream/str.html">str</a>());</div>
|
||||
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> }</div>
|
||||
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> msg.insert(<span class="stringliteral">"Content-Type"</span>, <span class="stringliteral">"application/json"</span>);</div>
|
||||
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> msg.insert(boost::beast::http::field::connection, <span class="stringliteral">"close"</span>);</div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> msg.body() = <a class="code hl_enumvalue" href="namespaceJson.html#a7d654b75c16a57007925868e38212b4eae8386dcfc36d1ae897745f7b4f77a1f6">Json::objectValue</a>;</div>
|
||||
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> {</div>
|
||||
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a>& ips = (msg.body()[<span class="stringliteral">"peer-ips"</span>] = <a class="code hl_enumvalue" href="namespaceJson.html#a7d654b75c16a57007925868e38212b4eadc8f264f36b55b063c78126b335415f4">Json::arrayValue</a>);</div>
|
||||
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& _ : <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->redirect(slot))</div>
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> ips.<a class="code hl_function" href="classJson_1_1Value.html#a21526b61dea2a1771030473e6248621e">append</a>(_.address.to_string());</div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> }</div>
|
||||
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> msg.prepare_payload();</div>
|
||||
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> <span class="keywordflow">return</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<SimpleWriter></a>(msg);</div>
|
||||
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> </div>
|
||||
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Writer></a></div>
|
||||
<div class="foldopen" id="foldopen00376" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d"> 376</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d">OverlayImpl::makeErrorResponse</a>(</div>
|
||||
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& slot,</div>
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>& request,</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> <a class="code hl_typedef" href="classripple_1_1OverlayImpl.html#a0d015fc3cac2f60d841c915eacc025e0">address_type</a> remote_address,</div>
|
||||
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text)</div>
|
||||
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span>{</div>
|
||||
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> boost::beast::http::response<boost::beast::http::empty_body> msg;</div>
|
||||
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> msg.version(request.version());</div>
|
||||
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> msg.result(boost::beast::http::status::bad_request);</div>
|
||||
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> msg.reason(<span class="stringliteral">"Bad Request ("</span> + text + <span class="stringliteral">")"</span>);</div>
|
||||
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> msg.insert(<span class="stringliteral">"Server"</span>, <a class="code hl_function" href="namespaceripple_1_1BuildInfo.html#a1e2b1646cf948c1c19ff190903c3e789">BuildInfo::getFullVersionString</a>());</div>
|
||||
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> msg.insert(<span class="stringliteral">"Remote-Address"</span>, remote_address.to_string());</div>
|
||||
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> msg.insert(boost::beast::http::field::connection, <span class="stringliteral">"close"</span>);</div>
|
||||
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> msg.prepare_payload();</div>
|
||||
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> <span class="keywordflow">return</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<SimpleWriter></a>(msg);</div>
|
||||
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span>}</div>
|
||||
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> </div>
|
||||
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Writer></a></div>
|
||||
<div class="foldopen" id="foldopen00378" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d"> 378</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d">OverlayImpl::makeErrorResponse</a>(</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& slot,</div>
|
||||
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>& request,</div>
|
||||
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> <a class="code hl_typedef" href="classripple_1_1OverlayImpl.html#a0d015fc3cac2f60d841c915eacc025e0">address_type</a> remote_address,</div>
|
||||
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text)</div>
|
||||
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span>{</div>
|
||||
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> boost::beast::http::response<boost::beast::http::empty_body> msg;</div>
|
||||
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> msg.version(request.version());</div>
|
||||
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> msg.result(boost::beast::http::status::bad_request);</div>
|
||||
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> msg.reason(<span class="stringliteral">"Bad Request ("</span> + text + <span class="stringliteral">")"</span>);</div>
|
||||
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> msg.insert(<span class="stringliteral">"Server"</span>, <a class="code hl_function" href="namespaceripple_1_1BuildInfo.html#a1e2b1646cf948c1c19ff190903c3e789">BuildInfo::getFullVersionString</a>());</div>
|
||||
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> msg.insert(<span class="stringliteral">"Remote-Address"</span>, remote_address.to_string());</div>
|
||||
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> msg.insert(boost::beast::http::field::connection, <span class="stringliteral">"close"</span>);</div>
|
||||
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> msg.prepare_payload();</div>
|
||||
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <span class="keywordflow">return</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<SimpleWriter></a>(msg);</div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> </div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> </div>
|
||||
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00396" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#ac74b1afabc6ab8f758a2566d51c51e36"> 396</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#ac74b1afabc6ab8f758a2566d51c51e36">OverlayImpl::connect</a>(<a class="code hl_class" href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a> <span class="keyword">const</span>& remote_endpoint)</div>
|
||||
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span>{</div>
|
||||
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> XRPL_ASSERT(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a00ee91c4b61c0f04dcf1476ce55bc215">work_</a>, <span class="stringliteral">"ripple::OverlayImpl::connect : work is set"</span>);</div>
|
||||
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> </div>
|
||||
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> <span class="keyword">auto</span> usage = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#ab1de6dfed841c59d844973a6196454a3">resourceManager</a>().<a class="code hl_function" href="classripple_1_1Resource_1_1Manager.html#ad4ffe7b5b4c60c74ab86c29bf212377e">newOutboundEndpoint</a>(remote_endpoint);</div>
|
||||
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> <span class="keywordflow">if</span> (usage.disconnect(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>))</div>
|
||||
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> {</div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> JLOG(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a87d6bd59020d94110027dcab3d9e3357">info</a>()) << <span class="stringliteral">"Over resource limit: "</span> << remote_endpoint;</div>
|
||||
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> }</div>
|
||||
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> </div>
|
||||
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> <span class="keyword">auto</span> <span class="keyword">const</span> [slot, result] = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#a0958b21a57d07810e3ed1dfc0962b66c">peerFinder</a>().<a class="code hl_function" href="classripple_1_1PeerFinder_1_1Manager.html#a0b963fb66bf565dbbce628683be995ed">new_outbound_slot</a>(remote_endpoint);</div>
|
||||
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <span class="keywordflow">if</span> (slot == <span class="keyword">nullptr</span>)</div>
|
||||
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> {</div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> JLOG(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"Connect: No slot for "</span> << remote_endpoint</div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> << <span class="stringliteral">": "</span> << <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(result);</div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> }</div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> </div>
|
||||
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="keyword">auto</span> <span class="keyword">const</span> p = <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<ConnectAttempt></a>(</div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>,</div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a145e946244cafe0d8596f25fe573e0be">io_context_</a>,</div>
|
||||
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> <a class="code hl_function" href="structbeast_1_1IPAddressConversion.html#a572d5ba5ce87b27c27497c908b907612">beast::IPAddressConversion::to_asio_endpoint</a>(remote_endpoint),</div>
|
||||
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> usage,</div>
|
||||
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#aea84682825b5a501b694feef477a350c">setup_</a>.<a class="code hl_variable" href="structripple_1_1Overlay_1_1Setup.html#a577378193620d0cbea0287dc0c091517">context</a>,</div>
|
||||
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a5c19b6bda81946939dd085c87a0d8d4b">next_id_</a>++,</div>
|
||||
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> slot,</div>
|
||||
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a2897c28a5b5040e80e66f676d201d03f">journal</a>(<span class="stringliteral">"Peer"</span>),</div>
|
||||
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> *<span class="keyword">this</span>);</div>
|
||||
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> </div>
|
||||
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(p.get(), p);</div>
|
||||
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> p->run();</div>
|
||||
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span>}</div>
|
||||
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> </div>
|
||||
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00398" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#ac74b1afabc6ab8f758a2566d51c51e36"> 398</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#ac74b1afabc6ab8f758a2566d51c51e36">OverlayImpl::connect</a>(<a class="code hl_class" href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a> <span class="keyword">const</span>& remote_endpoint)</div>
|
||||
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span>{</div>
|
||||
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> XRPL_ASSERT(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a00ee91c4b61c0f04dcf1476ce55bc215">work_</a>, <span class="stringliteral">"ripple::OverlayImpl::connect : work is set"</span>);</div>
|
||||
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> </div>
|
||||
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> <span class="keyword">auto</span> usage = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#ab1de6dfed841c59d844973a6196454a3">resourceManager</a>().<a class="code hl_function" href="classripple_1_1Resource_1_1Manager.html#ad4ffe7b5b4c60c74ab86c29bf212377e">newOutboundEndpoint</a>(remote_endpoint);</div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> <span class="keywordflow">if</span> (usage.disconnect(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>))</div>
|
||||
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> {</div>
|
||||
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> JLOG(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a87d6bd59020d94110027dcab3d9e3357">info</a>()) << <span class="stringliteral">"Over resource limit: "</span> << remote_endpoint;</div>
|
||||
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> }</div>
|
||||
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> </div>
|
||||
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> <span class="keyword">auto</span> <span class="keyword">const</span> [slot, result] = <a class="code hl_function" href="classripple_1_1OverlayImpl.html#a0958b21a57d07810e3ed1dfc0962b66c">peerFinder</a>().<a class="code hl_function" href="classripple_1_1PeerFinder_1_1Manager.html#a0b963fb66bf565dbbce628683be995ed">new_outbound_slot</a>(remote_endpoint);</div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> <span class="keywordflow">if</span> (slot == <span class="keyword">nullptr</span>)</div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> {</div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> JLOG(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"Connect: No slot for "</span> << remote_endpoint</div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> << <span class="stringliteral">": "</span> << <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(result);</div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> }</div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> </div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> <span class="keyword">auto</span> <span class="keyword">const</span> p = <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<ConnectAttempt></a>(</div>
|
||||
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>,</div>
|
||||
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a145e946244cafe0d8596f25fe573e0be">io_context_</a>,</div>
|
||||
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> <a class="code hl_function" href="structbeast_1_1IPAddressConversion.html#a572d5ba5ce87b27c27497c908b907612">beast::IPAddressConversion::to_asio_endpoint</a>(remote_endpoint),</div>
|
||||
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> usage,</div>
|
||||
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#aea84682825b5a501b694feef477a350c">setup_</a>.<a class="code hl_variable" href="structripple_1_1Overlay_1_1Setup.html#a577378193620d0cbea0287dc0c091517">context</a>,</div>
|
||||
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a5c19b6bda81946939dd085c87a0d8d4b">next_id_</a>++,</div>
|
||||
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> slot,</div>
|
||||
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a2897c28a5b5040e80e66f676d201d03f">journal</a>(<span class="stringliteral">"Peer"</span>),</div>
|
||||
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> *<span class="keyword">this</span>);</div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> </div>
|
||||
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(p.get(), p);</div>
|
||||
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> p->run();</div>
|
||||
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> </div>
|
||||
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
|
||||
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span><span class="comment">// Adds a peer that is already handshaked and active</span></div>
|
||||
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00435" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a340bd55af73ab8800735f6c3ac538817"> 435</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a340bd55af73ab8800735f6c3ac538817">OverlayImpl::add_active</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerImp></a> <span class="keyword">const</span>& peer)</div>
|
||||
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span>{</div>
|
||||
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> </div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> {</div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.emplace(peer->slot(), peer);</div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> result.second,</div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> <span class="stringliteral">"ripple::OverlayImpl::add_active : peer is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> }</div>
|
||||
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> </div>
|
||||
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> {</div>
|
||||
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ad71423fe133aa9534b31d3f86cce0221">ids_</a>.emplace(</div>
|
||||
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/utility/piecewise_construct.html">std::piecewise_construct</a>,</div>
|
||||
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer->id()),</div>
|
||||
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer));</div>
|
||||
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> result.second,</div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <span class="stringliteral">"ripple::OverlayImpl::add_active : peer ID is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> }</div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> </div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(peer.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr/get.html">get</a>(), peer);</div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> </div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> JLOG(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"activated "</span> << peer->getRemoteAddress() << <span class="stringliteral">" ("</span></div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> << peer->id() << <span class="stringliteral">":"</span></div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> << <a class="code hl_function" href="namespaceripple.html#a08a13b62b18272366f788632359e8793">toBase58</a>(</div>
|
||||
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <a class="code hl_enumvalue" href="namespaceripple.html#a1bf8df553d36589191c8057c136cce03ac3fe5edb1f8a81a8e585f6a27c120be6">TokenType::NodePublic</a>, peer->getNodePublic())</div>
|
||||
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> << <span class="stringliteral">")"</span>;</div>
|
||||
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> </div>
|
||||
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> <span class="comment">// As we are not on the strand, run() must be called</span></div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> <span class="comment">// while holding the lock, otherwise new I/O can be</span></div>
|
||||
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> <span class="comment">// queued after a call to stop().</span></div>
|
||||
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> peer->run();</div>
|
||||
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span>}</div>
|
||||
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> </div>
|
||||
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span><span class="comment">// Adds a peer that is already handshaked and active</span></div>
|
||||
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00437" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a340bd55af73ab8800735f6c3ac538817"> 437</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a340bd55af73ab8800735f6c3ac538817">OverlayImpl::add_active</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerImp></a> <span class="keyword">const</span>& peer)</div>
|
||||
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span>{</div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> <a class="code hl_class" href="classbeast_1_1WrappedSink.html">beast::WrappedSink</a> sink{<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a558ee61e7d49557254dae57a5b022d3a">sink</a>(), peer->prefix()};</div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> <a class="code hl_class" href="classbeast_1_1Journal.html">beast::Journal</a> journal{sink};</div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> </div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> </div>
|
||||
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> {</div>
|
||||
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.emplace(peer->slot(), peer);</div>
|
||||
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> result.second,</div>
|
||||
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> <span class="stringliteral">"ripple::OverlayImpl::add_active : peer is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> }</div>
|
||||
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> </div>
|
||||
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> {</div>
|
||||
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ad71423fe133aa9534b31d3f86cce0221">ids_</a>.emplace(</div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/utility/piecewise_construct.html">std::piecewise_construct</a>,</div>
|
||||
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer->id()),</div>
|
||||
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer));</div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> result.second,</div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> <span class="stringliteral">"ripple::OverlayImpl::add_active : peer ID is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> }</div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> </div>
|
||||
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(peer.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr/get.html">get</a>(), peer);</div>
|
||||
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> </div>
|
||||
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> JLOG(journal.debug()) << <span class="stringliteral">"activated"</span>;</div>
|
||||
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> </div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> <span class="comment">// As we are not on the strand, run() must be called</span></div>
|
||||
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> <span class="comment">// while holding the lock, otherwise new I/O can be</span></div>
|
||||
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> <span class="comment">// queued after a call to stop().</span></div>
|
||||
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> peer->run();</div>
|
||||
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> </div>
|
||||
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00473" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a8314d9411ae5be655929354317b4693b"> 473</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a8314d9411ae5be655929354317b4693b">OverlayImpl::remove</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& slot)</div>
|
||||
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span>{</div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> <span class="keyword">auto</span> <span class="keyword">const</span> iter = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.find(slot);</div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> iter != <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.end(), <span class="stringliteral">"ripple::OverlayImpl::remove : valid input"</span>);</div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.erase(iter);</div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span>}</div>
|
||||
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> </div>
|
||||
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00474" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a8314d9411ae5be655929354317b4693b"> 474</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a8314d9411ae5be655929354317b4693b">OverlayImpl::remove</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& slot)</div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span>{</div>
|
||||
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <span class="keyword">auto</span> <span class="keyword">const</span> iter = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.find(slot);</div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> iter != <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.end(), <span class="stringliteral">"ripple::OverlayImpl::remove : valid input"</span>);</div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">m_peers</a>.erase(iter);</div>
|
||||
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> </div>
|
||||
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00483" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a2f2026cf4da2aef295b1d6676b5fa6ab"> 483</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a2f2026cf4da2aef295b1d6676b5fa6ab">OverlayImpl::start</a>()</div>
|
||||
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span>{</div>
|
||||
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <a class="code hl_struct" href="structripple_1_1PeerFinder_1_1Config.html">PeerFinder::Config</a> config = <a class="code hl_function" href="structripple_1_1PeerFinder_1_1Config.html#a9321a565c8d2fac0bbc77cb24582fc94">PeerFinder::Config::makeConfig</a>(</div>
|
||||
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>(),</div>
|
||||
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ae5fe3dfe3daa120c09d5041b07104da6">serverHandler_</a>.<a class="code hl_function" href="classripple_1_1ServerHandler.html#ad08c6ebe6bede2bf1e3c35380eedc51c">setup</a>().overlay.port(),</div>
|
||||
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#aa1e13241445bc4b53c9a2aedc0617131">getValidationPublicKey</a>().has_value(),</div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#aea84682825b5a501b694feef477a350c">setup_</a>.<a class="code hl_variable" href="structripple_1_1Overlay_1_1Setup.html#a80250951d1e867a2cdc1cb3f4ed6d8a1">ipLimit</a>);</div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> </div>
|
||||
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->setConfig(config);</div>
|
||||
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->start();</div>
|
||||
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> </div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> <span class="comment">// Populate our boot cache: if there are no entries in [ips] then we use</span></div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="comment">// the entries in [ips_fixed].</span></div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="keyword">auto</span> bootstrapIps =</div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a4d565d92bcdf3e2a4156a65604e219c2">IPS</a>.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>() ? <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a3aaac87eab79667cbfd584dc4e7d6d6e">IPS_FIXED</a> : <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a4d565d92bcdf3e2a4156a65604e219c2">IPS</a>;</div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> </div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> <span class="comment">// If nothing is specified, default to several well-known high-capacity</span></div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> <span class="comment">// servers to serve as bootstrap:</span></div>
|
||||
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> <span class="keywordflow">if</span> (bootstrapIps.empty())</div>
|
||||
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> {</div>
|
||||
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> <span class="comment">// Pool of servers operated by Ripple Labs Inc. - https://ripple.com</span></div>
|
||||
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> bootstrapIps.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<span class="stringliteral">"r.ripple.com 51235"</span>);</div>
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> </div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> <span class="comment">// Pool of servers operated by ISRDC - https://isrdc.in</span></div>
|
||||
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> bootstrapIps.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/push_back.html">push_back</a>(<span class="stringliteral">"sahyadri.isrdc.in 51235"</span>);</div>
|
||||
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> </div>
|
||||
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> <span class="comment">// Pool of servers operated by @Xrpkuwait - https://xrpkuwait.com</span></div>
|
||||
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> bootstrapIps.push_back(<span class="stringliteral">"hubs.xrpkuwait.com 51235"</span>);</div>
|
||||
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> </div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> <span class="comment">// Pool of servers operated by XRPL Commons - https://xrpl-commons.org</span></div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> bootstrapIps.push_back(<span class="stringliteral">"hub.xrpl-commons.org 51235"</span>);</div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> }</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> </div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a222db6945256c0eebf01c39c572f655c">m_resolver</a>.<a class="code hl_function" href="classripple_1_1Resolver.html#a2b7ea0953f182de10d6d5818e6b26874">resolve</a>(</div>
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> bootstrapIps,</div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> [<span class="keyword">this</span>](</div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& <a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>,</div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<beast::IP::Endpoint></a> <span class="keyword">const</span>& addresses) {</div>
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> ips;</div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(addresses.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>());</div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& addr : addresses)</div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> {</div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> <span class="keywordflow">if</span> (addr.port() == 0)</div>
|
||||
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(addr.at_port(DEFAULT_PEER_PORT)));</div>
|
||||
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(addr));</div>
|
||||
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> }</div>
|
||||
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> </div>
|
||||
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span> base(<span class="stringliteral">"config: "</span>);</div>
|
||||
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> <span class="keywordflow">if</span> (!ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
||||
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->addFallbackStrings(base + <a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>, ips);</div>
|
||||
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> });</div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> </div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <span class="comment">// Add the ips_fixed from the rippled.cfg file</span></div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_function" href="classripple_1_1Config.html#a55cd8ef67ffbf6a137e0dd71bc8151c6">standalone</a>() && !<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a3aaac87eab79667cbfd584dc4e7d6d6e">IPS_FIXED</a>.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
||||
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> {</div>
|
||||
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a222db6945256c0eebf01c39c572f655c">m_resolver</a>.<a class="code hl_function" href="classripple_1_1Resolver.html#a2b7ea0953f182de10d6d5818e6b26874">resolve</a>(</div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a3aaac87eab79667cbfd584dc4e7d6d6e">IPS_FIXED</a>,</div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> [<span class="keyword">this</span>](</div>
|
||||
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& <a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>,</div>
|
||||
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<beast::IP::Endpoint></a> <span class="keyword">const</span>& addresses) {</div>
|
||||
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<beast::IP::Endpoint></a> ips;</div>
|
||||
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(addresses.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>());</div>
|
||||
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> </div>
|
||||
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& addr : addresses)</div>
|
||||
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> {</div>
|
||||
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> <span class="keywordflow">if</span> (addr.port() == 0)</div>
|
||||
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(addr.address(), DEFAULT_PEER_PORT);</div>
|
||||
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(addr);</div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> }</div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> </div>
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> <span class="keywordflow">if</span> (!ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->addFixedPeer(<a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>, ips);</div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> });</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> }</div>
|
||||
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> <span class="keyword">auto</span> <span class="keyword">const</span> timer = <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<Timer></a>(*<span class="keyword">this</span>);</div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(timer.get(), timer);</div>
|
||||
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a6ae36a0619d8d8763fd06379fbd7ddf3">timer_</a> = timer;</div>
|
||||
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> timer->async_wait();</div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span>}</div>
|
||||
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> </div>
|
||||
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00484" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a2f2026cf4da2aef295b1d6676b5fa6ab"> 484</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a2f2026cf4da2aef295b1d6676b5fa6ab">OverlayImpl::start</a>()</div>
|
||||
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span>{</div>
|
||||
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <a class="code hl_struct" href="structripple_1_1PeerFinder_1_1Config.html">PeerFinder::Config</a> config = <a class="code hl_function" href="structripple_1_1PeerFinder_1_1Config.html#a9321a565c8d2fac0bbc77cb24582fc94">PeerFinder::Config::makeConfig</a>(</div>
|
||||
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>(),</div>
|
||||
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ae5fe3dfe3daa120c09d5041b07104da6">serverHandler_</a>.<a class="code hl_function" href="classripple_1_1ServerHandler.html#ad08c6ebe6bede2bf1e3c35380eedc51c">setup</a>().overlay.port(),</div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#aa1e13241445bc4b53c9a2aedc0617131">getValidationPublicKey</a>().has_value(),</div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#aea84682825b5a501b694feef477a350c">setup_</a>.<a class="code hl_variable" href="structripple_1_1Overlay_1_1Setup.html#a80250951d1e867a2cdc1cb3f4ed6d8a1">ipLimit</a>);</div>
|
||||
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> </div>
|
||||
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->setConfig(config);</div>
|
||||
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->start();</div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> </div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="comment">// Populate our boot cache: if there are no entries in [ips] then we use</span></div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="comment">// the entries in [ips_fixed].</span></div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <span class="keyword">auto</span> bootstrapIps =</div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a4d565d92bcdf3e2a4156a65604e219c2">IPS</a>.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>() ? <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a3aaac87eab79667cbfd584dc4e7d6d6e">IPS_FIXED</a> : <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a4d565d92bcdf3e2a4156a65604e219c2">IPS</a>;</div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> </div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> <span class="comment">// If nothing is specified, default to several well-known high-capacity</span></div>
|
||||
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> <span class="comment">// servers to serve as bootstrap:</span></div>
|
||||
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> <span class="keywordflow">if</span> (bootstrapIps.empty())</div>
|
||||
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> {</div>
|
||||
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> <span class="comment">// Pool of servers operated by Ripple Labs Inc. - https://ripple.com</span></div>
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> bootstrapIps.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<span class="stringliteral">"r.ripple.com 51235"</span>);</div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> </div>
|
||||
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> <span class="comment">// Pool of servers operated by ISRDC - https://isrdc.in</span></div>
|
||||
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> bootstrapIps.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/push_back.html">push_back</a>(<span class="stringliteral">"sahyadri.isrdc.in 51235"</span>);</div>
|
||||
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> </div>
|
||||
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> <span class="comment">// Pool of servers operated by @Xrpkuwait - https://xrpkuwait.com</span></div>
|
||||
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> bootstrapIps.push_back(<span class="stringliteral">"hubs.xrpkuwait.com 51235"</span>);</div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> </div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> <span class="comment">// Pool of servers operated by XRPL Commons - https://xrpl-commons.org</span></div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> bootstrapIps.push_back(<span class="stringliteral">"hub.xrpl-commons.org 51235"</span>);</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> }</div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> </div>
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a222db6945256c0eebf01c39c572f655c">m_resolver</a>.<a class="code hl_function" href="classripple_1_1Resolver.html#a2b7ea0953f182de10d6d5818e6b26874">resolve</a>(</div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> bootstrapIps,</div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> [<span class="keyword">this</span>](</div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& <a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>,</div>
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<beast::IP::Endpoint></a> <span class="keyword">const</span>& addresses) {</div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> ips;</div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(addresses.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>());</div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& addr : addresses)</div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> {</div>
|
||||
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> <span class="keywordflow">if</span> (addr.port() == 0)</div>
|
||||
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(addr.at_port(DEFAULT_PEER_PORT)));</div>
|
||||
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(addr));</div>
|
||||
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> }</div>
|
||||
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> </div>
|
||||
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span> base(<span class="stringliteral">"config: "</span>);</div>
|
||||
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> <span class="keywordflow">if</span> (!ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
||||
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->addFallbackStrings(base + <a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>, ips);</div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> });</div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> </div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> <span class="comment">// Add the ips_fixed from the rippled.cfg file</span></div>
|
||||
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_function" href="classripple_1_1Config.html#a55cd8ef67ffbf6a137e0dd71bc8151c6">standalone</a>() && !<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a3aaac87eab79667cbfd584dc4e7d6d6e">IPS_FIXED</a>.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
||||
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> {</div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a222db6945256c0eebf01c39c572f655c">m_resolver</a>.<a class="code hl_function" href="classripple_1_1Resolver.html#a2b7ea0953f182de10d6d5818e6b26874">resolve</a>(</div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a687e7562a21884a6c0e98b1449ce0391">app_</a>.<a class="code hl_function" href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">config</a>().<a class="code hl_variable" href="classripple_1_1Config.html#a3aaac87eab79667cbfd584dc4e7d6d6e">IPS_FIXED</a>,</div>
|
||||
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> [<span class="keyword">this</span>](</div>
|
||||
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& <a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>,</div>
|
||||
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<beast::IP::Endpoint></a> <span class="keyword">const</span>& addresses) {</div>
|
||||
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<beast::IP::Endpoint></a> ips;</div>
|
||||
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(addresses.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>());</div>
|
||||
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> </div>
|
||||
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& addr : addresses)</div>
|
||||
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> {</div>
|
||||
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> <span class="keywordflow">if</span> (addr.port() == 0)</div>
|
||||
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(addr.address(), DEFAULT_PEER_PORT);</div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(addr);</div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> }</div>
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> </div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> <span class="keywordflow">if</span> (!ips.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->addFixedPeer(<a class="code hl_function" href="classbeast_1_1PropertyStream_1_1Source.html#a5672372869d3a59c7cd2f7ce3056ae33">name</a>, ips);</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> });</div>
|
||||
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> }</div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> <span class="keyword">auto</span> <span class="keyword">const</span> timer = <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::make_shared<Timer></a>(*<span class="keyword">this</span>);</div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.emplace(timer.get(), timer);</div>
|
||||
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a6ae36a0619d8d8763fd06379fbd7ddf3">timer_</a> = timer;</div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> timer->async_wait();</div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> </div>
|
||||
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00567" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a05a93f036814f8866586c2bd76c6790a"> 567</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a05a93f036814f8866586c2bd76c6790a">OverlayImpl::stop</a>()</div>
|
||||
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span>{</div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> boost::asio::dispatch(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a991d6c6966099b83b4f6c9e8c87e51f6">strand_</a>, <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/functional/bind.html">std::bind</a>(&<a class="code hl_function" href="classripple_1_1OverlayImpl.html#a3c3a10e068fa7d1d99050e37e550481b">OverlayImpl::stopChildren</a>, <span class="keyword">this</span>));</div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> {</div>
|
||||
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock</a><<span class="keyword">decltype</span>(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>)> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a1da818e5fc573a9dafecaa0dfb2a648a">cond_</a>.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable_any/wait.html">wait</a>(lock, [<span class="keyword">this</span>] { <span class="keywordflow">return</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.empty(); });</div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> }</div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->stop();</div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span>}</div>
|
||||
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> </div>
|
||||
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00568" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a05a93f036814f8866586c2bd76c6790a"> 568</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a05a93f036814f8866586c2bd76c6790a">OverlayImpl::stop</a>()</div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span>{</div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> boost::asio::dispatch(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a991d6c6966099b83b4f6c9e8c87e51f6">strand_</a>, <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/functional/bind.html">std::bind</a>(&<a class="code hl_function" href="classripple_1_1OverlayImpl.html#a3c3a10e068fa7d1d99050e37e550481b">OverlayImpl::stopChildren</a>, <span class="keyword">this</span>));</div>
|
||||
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> {</div>
|
||||
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock</a><<span class="keyword">decltype</span>(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>)> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a1da818e5fc573a9dafecaa0dfb2a648a">cond_</a>.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable_any/wait.html">wait</a>(lock, [<span class="keyword">this</span>] { <span class="keywordflow">return</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#afb6dd748e4986d93f5229b030a54641e">list_</a>.empty(); });</div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> }</div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">m_peerFinder</a>->stop();</div>
|
||||
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span> </div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span><span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span><span class="comment">// PropertyStream</span></div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span><span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> </div>
|
||||
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00584" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a20efec9ce4b1701e4a988430465cbe24"> 584</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a20efec9ce4b1701e4a988430465cbe24">OverlayImpl::onWrite</a>(<a class="code hl_class" href="classbeast_1_1PropertyStream_1_1Map.html">beast::PropertyStream::Map</a>& stream)</div>
|
||||
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span>{</div>
|
||||
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> <a class="code hl_class" href="classbeast_1_1PropertyStream_1_1Set.html">beast::PropertyStream::Set</a> <a class="code hl_function" href="namespaceripple.html#a53f80df10254751781250aa20704e98f">set</a>(<span class="stringliteral">"traffic"</span>, stream);</div>
|
||||
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> <span class="keyword">auto</span> <span class="keyword">const</span> stats = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a4a3360b843f3b488afc05cbd164606fd">m_traffic</a>.<a class="code hl_function" href="classripple_1_1TrafficCount.html#a277e5fe1d38d93bdaac7d94d52d5d872">getCounts</a>();</div>
|
||||
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& pair : stats)</div>
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> {</div>
|
||||
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> <a class="code hl_class" href="classbeast_1_1PropertyStream_1_1Map.html">beast::PropertyStream::Map</a> item(<a class="code hl_function" href="namespaceripple.html#a53f80df10254751781250aa20704e98f">set</a>);</div>
|
||||
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> item[<span class="stringliteral">"category"</span>] = pair.second.name;</div>
|
||||
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> item[<span class="stringliteral">"bytes_in"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.bytesIn.load());</div>
|
||||
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> item[<span class="stringliteral">"messages_in"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.messagesIn.load());</div>
|
||||
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> item[<span class="stringliteral">"bytes_out"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.bytesOut.load());</div>
|
||||
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> item[<span class="stringliteral">"messages_out"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.messagesOut.load());</div>
|
||||
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> }</div>
|
||||
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span>}</div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> </div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span><span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span><span class="comment">// PropertyStream</span></div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span><span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> </div>
|
||||
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00585" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a20efec9ce4b1701e4a988430465cbe24"> 585</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a20efec9ce4b1701e4a988430465cbe24">OverlayImpl::onWrite</a>(<a class="code hl_class" href="classbeast_1_1PropertyStream_1_1Map.html">beast::PropertyStream::Map</a>& stream)</div>
|
||||
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span>{</div>
|
||||
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> <a class="code hl_class" href="classbeast_1_1PropertyStream_1_1Set.html">beast::PropertyStream::Set</a> <a class="code hl_function" href="namespaceripple.html#a53f80df10254751781250aa20704e98f">set</a>(<span class="stringliteral">"traffic"</span>, stream);</div>
|
||||
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> <span class="keyword">auto</span> <span class="keyword">const</span> stats = <a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a4a3360b843f3b488afc05cbd164606fd">m_traffic</a>.<a class="code hl_function" href="classripple_1_1TrafficCount.html#a277e5fe1d38d93bdaac7d94d52d5d872">getCounts</a>();</div>
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& pair : stats)</div>
|
||||
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> {</div>
|
||||
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> <a class="code hl_class" href="classbeast_1_1PropertyStream_1_1Map.html">beast::PropertyStream::Map</a> item(<a class="code hl_function" href="namespaceripple.html#a53f80df10254751781250aa20704e98f">set</a>);</div>
|
||||
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> item[<span class="stringliteral">"category"</span>] = pair.second.name;</div>
|
||||
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> item[<span class="stringliteral">"bytes_in"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.bytesIn.load());</div>
|
||||
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> item[<span class="stringliteral">"messages_in"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.messagesIn.load());</div>
|
||||
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> item[<span class="stringliteral">"bytes_out"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.bytesOut.load());</div>
|
||||
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> item[<span class="stringliteral">"messages_out"</span>] = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(pair.second.messagesOut.load());</div>
|
||||
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> }</div>
|
||||
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> </div>
|
||||
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00606" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a27a8da8d13b1bc7ded86ccead573eafd"> 606</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a27a8da8d13b1bc7ded86ccead573eafd">OverlayImpl::activate</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerImp></a> <span class="keyword">const</span>& peer)</div>
|
||||
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"> 607</span>{</div>
|
||||
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span> <span class="comment">// Now track this peer</span></div>
|
||||
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> {</div>
|
||||
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span> <span class="keyword">auto</span> <span class="keyword">const</span> result(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ad71423fe133aa9534b31d3f86cce0221">ids_</a>.emplace(</div>
|
||||
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno"> 612</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/utility/piecewise_construct.html">std::piecewise_construct</a>,</div>
|
||||
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"> 613</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer->id()),</div>
|
||||
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"> 614</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer)));</div>
|
||||
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"> 616</span> result.second,</div>
|
||||
<div class="line"><a id="l00617" name="l00617"></a><span class="lineno"> 617</span> <span class="stringliteral">"ripple::OverlayImpl::activate : peer ID is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno"> 618</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno"> 619</span> }</div>
|
||||
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"> 620</span> </div>
|
||||
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"> 621</span> JLOG(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">debug</a>()) << <span class="stringliteral">"activated "</span> << peer->getRemoteAddress() << <span class="stringliteral">" ("</span></div>
|
||||
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno"> 622</span> << peer->id() << <span class="stringliteral">":"</span></div>
|
||||
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"> 623</span> << <a class="code hl_function" href="namespaceripple.html#a08a13b62b18272366f788632359e8793">toBase58</a>(</div>
|
||||
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"> 624</span> <a class="code hl_enumvalue" href="namespaceripple.html#a1bf8df553d36589191c8057c136cce03ac3fe5edb1f8a81a8e585f6a27c120be6">TokenType::NodePublic</a>, peer->getNodePublic())</div>
|
||||
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"> 625</span> << <span class="stringliteral">")"</span>;</div>
|
||||
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span> </div>
|
||||
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"> 600</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span><span class="keywordtype">void</span></div>
|
||||
<div class="foldopen" id="foldopen00607" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"><a class="line" href="classripple_1_1OverlayImpl.html#a27a8da8d13b1bc7ded86ccead573eafd"> 607</a></span><a class="code hl_function" href="classripple_1_1OverlayImpl.html#a27a8da8d13b1bc7ded86ccead573eafd">OverlayImpl::activate</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerImp></a> <span class="keyword">const</span>& peer)</div>
|
||||
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span>{</div>
|
||||
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> <a class="code hl_class" href="classbeast_1_1WrappedSink.html">beast::WrappedSink</a> sink{<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#af9f9ddea045cd3ef7b27d700f9962dd0">journal_</a>.<a class="code hl_function" href="classbeast_1_1Journal.html#a558ee61e7d49557254dae57a5b022d3a">sink</a>(), peer->prefix()};</div>
|
||||
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span> <a class="code hl_class" href="classbeast_1_1Journal.html">beast::Journal</a> journal{sink};</div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span> </div>
|
||||
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno"> 612</span> <span class="comment">// Now track this peer</span></div>
|
||||
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"> 613</span> {</div>
|
||||
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"> 614</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">mutex_</a>);</div>
|
||||
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> <span class="keyword">auto</span> <span class="keyword">const</span> result(<a class="code hl_variable" href="classripple_1_1OverlayImpl.html#ad71423fe133aa9534b31d3f86cce0221">ids_</a>.emplace(</div>
|
||||
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"> 616</span> <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/utility/piecewise_construct.html">std::piecewise_construct</a>,</div>
|
||||
<div class="line"><a id="l00617" name="l00617"></a><span class="lineno"> 617</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer->id()),</div>
|
||||
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno"> 618</span> <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(peer)));</div>
|
||||
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno"> 619</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"> 620</span> result.second,</div>
|
||||
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"> 621</span> <span class="stringliteral">"ripple::OverlayImpl::activate : peer ID is inserted"</span>);</div>
|
||||
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno"> 622</span> (void)result.second;</div>
|
||||
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"> 623</span> }</div>
|
||||
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"> 624</span> </div>
|
||||
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"> 625</span> JLOG(journal.debug()) << <span class="stringliteral">"activated"</span>;</div>
|
||||
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno"> 626</span> </div>
|
||||
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"> 627</span> <span class="comment">// We just accepted this peer so we have non-zero active peers</span></div>
|
||||
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno"> 628</span> XRPL_ASSERT(<a class="code hl_function" href="classripple_1_1OverlayImpl.html#a98a077168a135ac114235f3e055fd5b3">size</a>(), <span class="stringliteral">"ripple::OverlayImpl::activate : nonzero peers"</span>);</div>
|
||||
@@ -1821,6 +1821,7 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<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#l00037">IPEndpoint.h:38</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#l00059">Journal.h:60</a></div></div>
|
||||
<div class="ttc" id="aclassbeast_1_1Journal_html_a556228cb60bcf405c225d3f64b7b01ae"><div class="ttname"><a href="classbeast_1_1Journal.html#a556228cb60bcf405c225d3f64b7b01ae">beast::Journal::debug</a></div><div class="ttdeci">Stream debug() const</div><div class="ttdef"><b>Definition</b> <a href="Journal_8h_source.html#l00328">Journal.h:328</a></div></div>
|
||||
<div class="ttc" id="aclassbeast_1_1Journal_html_a558ee61e7d49557254dae57a5b022d3a"><div class="ttname"><a href="classbeast_1_1Journal.html#a558ee61e7d49557254dae57a5b022d3a">beast::Journal::sink</a></div><div class="ttdeci">Sink & sink() const</div><div class="ttdoc">Returns the Sink associated with this Journal.</div><div class="ttdef"><b>Definition</b> <a href="Journal_8h_source.html#l00297">Journal.h:297</a></div></div>
|
||||
<div class="ttc" id="aclassbeast_1_1Journal_html_a87d6bd59020d94110027dcab3d9e3357"><div class="ttname"><a href="classbeast_1_1Journal.html#a87d6bd59020d94110027dcab3d9e3357">beast::Journal::info</a></div><div class="ttdeci">Stream info() const</div><div class="ttdef"><b>Definition</b> <a href="Journal_8h_source.html#l00334">Journal.h:334</a></div></div>
|
||||
<div class="ttc" id="aclassbeast_1_1Journal_html_abbe082bd27ca0f1d1365af2824e4f85b"><div class="ttname"><a href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">beast::Journal::trace</a></div><div class="ttdeci">Stream trace() const</div><div class="ttdoc">Severity stream access functions.</div><div class="ttdef"><b>Definition</b> <a href="Journal_8h_source.html#l00322">Journal.h:322</a></div></div>
|
||||
<div class="ttc" id="aclassbeast_1_1PropertyStream_1_1Map_html"><div class="ttname"><a href="classbeast_1_1PropertyStream_1_1Map.html">beast::PropertyStream::Map</a></div><div class="ttdef"><b>Definition</b> <a href="PropertyStream_8h_source.html#l00222">PropertyStream.h:223</a></div></div>
|
||||
@@ -1866,8 +1867,8 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a00ee91c4b61c0f04dcf1476ce55bc215"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a00ee91c4b61c0f04dcf1476ce55bc215">ripple::OverlayImpl::work_</a></div><div class="ttdeci">std::optional< boost::asio::executor_work_guard< boost::asio::io_context::executor_type > > work_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00107">OverlayImpl.h:107</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a04425d981aa3a6fac81e1ce7d400103a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a04425d981aa3a6fac81e1ce7d400103a">ripple::OverlayImpl::error_code</a></div><div class="ttdeci">boost::system::error_code error_code</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00084">OverlayImpl.h:84</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a05659a5131a98ed0273b5d280e072c34"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a05659a5131a98ed0273b5d280e072c34">ripple::OverlayImpl::getUnlInfo</a></div><div class="ttdeci">Json::Value getUnlInfo()</div><div class="ttdoc">Returns information about the local server's UNL.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00802">OverlayImpl.cpp:802</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a05a93f036814f8866586c2bd76c6790a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a05a93f036814f8866586c2bd76c6790a">ripple::OverlayImpl::stop</a></div><div class="ttdeci">void stop() override</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00567">OverlayImpl.cpp:567</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a0888985ab827a3df0e079496a8918740"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a0888985ab827a3df0e079496a8918740">ripple::OverlayImpl::makePrefix</a></div><div class="ttdeci">static std::string makePrefix(std::uint32_t id)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00341">OverlayImpl.cpp:341</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a05a93f036814f8866586c2bd76c6790a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a05a93f036814f8866586c2bd76c6790a">ripple::OverlayImpl::stop</a></div><div class="ttdeci">void stop() override</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00568">OverlayImpl.cpp:568</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a0888985ab827a3df0e079496a8918740"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a0888985ab827a3df0e079496a8918740">ripple::OverlayImpl::makePrefix</a></div><div class="ttdeci">static std::string makePrefix(std::uint32_t id)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00343">OverlayImpl.cpp:343</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a0958b21a57d07810e3ed1dfc0962b66c"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a0958b21a57d07810e3ed1dfc0962b66c">ripple::OverlayImpl::peerFinder</a></div><div class="ttdeci">PeerFinder::Manager & peerFinder()</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00164">OverlayImpl.h:164</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a0a209b9b9ce7ffa5cea585be740f9c2c"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a0a209b9b9ce7ffa5cea585be740f9c2c">ripple::OverlayImpl::endpoint_type</a></div><div class="ttdeci">boost::asio::ip::tcp::endpoint endpoint_type</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00083">OverlayImpl.h:83</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a0c8c9cc796e886ba9c96d68b7acfcc4b"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a0c8c9cc796e886ba9c96d68b7acfcc4b">ripple::OverlayImpl::processHealth</a></div><div class="ttdeci">bool processHealth(http_request_type const &req, Handoff &handoff)</div><div class="ttdoc">Handles health requests.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00949">OverlayImpl.cpp:949</a></div></div>
|
||||
@@ -1875,14 +1876,14 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a145e946244cafe0d8596f25fe573e0be"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a145e946244cafe0d8596f25fe573e0be">ripple::OverlayImpl::io_context_</a></div><div class="ttdeci">boost::asio::io_context & io_context_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00104">OverlayImpl.h:104</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a1857a64f0516de9ed62deea84574ced5"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a1857a64f0516de9ed62deea84574ced5">ripple::OverlayImpl::is_upgrade</a></div><div class="ttdeci">static bool is_upgrade(boost::beast::http::header< true, Fields > const &req)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00323">OverlayImpl.h:323</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a1da818e5fc573a9dafecaa0dfb2a648a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a1da818e5fc573a9dafecaa0dfb2a648a">ripple::OverlayImpl::cond_</a></div><div class="ttdeci">std::condition_variable_any cond_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00110">OverlayImpl.h:110</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a20efec9ce4b1701e4a988430465cbe24"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a20efec9ce4b1701e4a988430465cbe24">ripple::OverlayImpl::onWrite</a></div><div class="ttdeci">void onWrite(beast::PropertyStream::Map &stream) override</div><div class="ttdoc">Subclass override.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00584">OverlayImpl.cpp:584</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a20efec9ce4b1701e4a988430465cbe24"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a20efec9ce4b1701e4a988430465cbe24">ripple::OverlayImpl::onWrite</a></div><div class="ttdeci">void onWrite(beast::PropertyStream::Map &stream) override</div><div class="ttdoc">Subclass override.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00585">OverlayImpl.cpp:585</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a21ecf8c5c7a9b2f9dba05b1a07b89f06"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a21ecf8c5c7a9b2f9dba05b1a07b89f06">ripple::OverlayImpl::deleteIdlePeers</a></div><div class="ttdeci">void deleteIdlePeers()</div><div class="ttdoc">Check if peers stopped relaying messages and if slots stopped receiving messages from the validator.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01479">OverlayImpl.cpp:1479</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a222db6945256c0eebf01c39c572f655c"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a222db6945256c0eebf01c39c572f655c">ripple::OverlayImpl::m_resolver</a></div><div class="ttdeci">Resolver & m_resolver</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00121">OverlayImpl.h:121</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a27a8da8d13b1bc7ded86ccead573eafd"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a27a8da8d13b1bc7ded86ccead573eafd">ripple::OverlayImpl::activate</a></div><div class="ttdeci">void activate(std::shared_ptr< PeerImp > const &peer)</div><div class="ttdoc">Called when a peer has connected successfully This is called after the peer handshake has been comple...</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00606">OverlayImpl.cpp:606</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a27a8da8d13b1bc7ded86ccead573eafd"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a27a8da8d13b1bc7ded86ccead573eafd">ripple::OverlayImpl::activate</a></div><div class="ttdeci">void activate(std::shared_ptr< PeerImp > const &peer)</div><div class="ttdoc">Called when a peer has connected successfully This is called after the peer handshake has been comple...</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00607">OverlayImpl.cpp:607</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a2eb13be3a38a8711d749372f968dac22"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a2eb13be3a38a8711d749372f968dac22">ripple::OverlayImpl::getActivePeers</a></div><div class="ttdeci">PeerSequence getActivePeers() const override</div><div class="ttdoc">Returns a sequence representing the current list of peers.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01055">OverlayImpl.cpp:1055</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a2f2026cf4da2aef295b1d6676b5fa6ab"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a2f2026cf4da2aef295b1d6676b5fa6ab">ripple::OverlayImpl::start</a></div><div class="ttdeci">void start() override</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00483">OverlayImpl.cpp:483</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a2f2026cf4da2aef295b1d6676b5fa6ab"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a2f2026cf4da2aef295b1d6676b5fa6ab">ripple::OverlayImpl::start</a></div><div class="ttdeci">void start() override</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00484">OverlayImpl.cpp:484</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a31b9fcb4a7968e9836b3723763527f25"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a31b9fcb4a7968e9836b3723763527f25">ripple::OverlayImpl::m_peers</a></div><div class="ttdeci">hash_map< std::shared_ptr< PeerFinder::Slot >, std::weak_ptr< PeerImp > > m_peers</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00119">OverlayImpl.h:119</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a340bd55af73ab8800735f6c3ac538817"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a340bd55af73ab8800735f6c3ac538817">ripple::OverlayImpl::add_active</a></div><div class="ttdeci">void add_active(std::shared_ptr< PeerImp > const &peer)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00435">OverlayImpl.cpp:435</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a340bd55af73ab8800735f6c3ac538817"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a340bd55af73ab8800735f6c3ac538817">ripple::OverlayImpl::add_active</a></div><div class="ttdeci">void add_active(std::shared_ptr< PeerImp > const &peer)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00437">OverlayImpl.cpp:437</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a35852ee0ce8279aef2a36773dd861223"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a35852ee0ce8279aef2a36773dd861223">ripple::OverlayImpl::findPeerByPublicKey</a></div><div class="ttdeci">std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override</div><div class="ttdoc">Returns the peer with the matching public key, or null.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01122">OverlayImpl.cpp:1122</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a3a0bf589a6364fd1bcd500d661daba6a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a3a0bf589a6364fd1bcd500d661daba6a">ripple::OverlayImpl::m_resourceManager</a></div><div class="ttdeci">Resource::Manager & m_resourceManager</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00116">OverlayImpl.h:116</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a3c3a10e068fa7d1d99050e37e550481b"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a3c3a10e068fa7d1d99050e37e550481b">ripple::OverlayImpl::stopChildren</a></div><div class="ttdeci">void stopChildren()</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01315">OverlayImpl.cpp:1315</a></div></div>
|
||||
@@ -1890,7 +1891,7 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a4888f79cc6166a92dd3061621fb5d3ef"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a4888f79cc6166a92dd3061621fb5d3ef">ripple::OverlayImpl::manifestListSeq_</a></div><div class="ttdeci">std::optional< std::uint32_t > manifestListSeq_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00136">OverlayImpl.h:136</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a4a3360b843f3b488afc05cbd164606fd"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a4a3360b843f3b488afc05cbd164606fd">ripple::OverlayImpl::m_traffic</a></div><div class="ttdeci">TrafficCount m_traffic</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00118">OverlayImpl.h:118</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a4af02b1675b8d13ceb9ea72d031906f6"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a4af02b1675b8d13ceb9ea72d031906f6">ripple::OverlayImpl::squelch</a></div><div class="ttdeci">void squelch(PublicKey const &validator, Peer::id_t const id, std::uint32_t squelchDuration) const override</div><div class="ttdoc">Squelch handler.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01407">OverlayImpl.cpp:1407</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a4bef375aa1fa1abd230bee5634a1285d"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d">ripple::OverlayImpl::makeErrorResponse</a></div><div class="ttdeci">std::shared_ptr< Writer > makeErrorResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address, std::string msg)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00376">OverlayImpl.cpp:376</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a4bef375aa1fa1abd230bee5634a1285d"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a4bef375aa1fa1abd230bee5634a1285d">ripple::OverlayImpl::makeErrorResponse</a></div><div class="ttdeci">std::shared_ptr< Writer > makeErrorResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address, std::string msg)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00378">OverlayImpl.cpp:378</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a502be733e9eb03226ef53a062312833c"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a502be733e9eb03226ef53a062312833c">ripple::OverlayImpl::slots_</a></div><div class="ttdeci">reduce_relay::Slots< UptimeClock > slots_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00128">OverlayImpl.h:128</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a522fb9ffec5625df2a15f19b2e629ba9"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a522fb9ffec5625df2a15f19b2e629ba9">ripple::OverlayImpl::deletePeer</a></div><div class="ttdeci">void deletePeer(Peer::id_t id)</div><div class="ttdoc">Called when the peer is deleted.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01470">OverlayImpl.cpp:1470</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a534b616d5493147c3eb197af4f3f7cf1"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a534b616d5493147c3eb197af4f3f7cf1">ripple::OverlayImpl::findPeerByShortID</a></div><div class="ttdeci">std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) const override</div><div class="ttdoc">Returns the peer with the matching short id, or null.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01110">OverlayImpl.cpp:1110</a></div></div>
|
||||
@@ -1905,7 +1906,7 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a766f78a5f139b74f35d84dcc3d5ceb42"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a766f78a5f139b74f35d84dcc3d5ceb42">ripple::OverlayImpl::processRequest</a></div><div class="ttdeci">bool processRequest(http_request_type const &req, Handoff &handoff)</div><div class="ttdoc">Handles non-peer protocol requests.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01047">OverlayImpl.cpp:1047</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a7df56f21d09513351c98a973f4022836"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a7df56f21d09513351c98a973f4022836">ripple::OverlayImpl::mutex_</a></div><div class="ttdeci">std::recursive_mutex mutex_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00109">OverlayImpl.h:109</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a80a5c09b232c3fc6d872f53206c34ed1"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a80a5c09b232c3fc6d872f53206c34ed1">ripple::OverlayImpl::sendEndpoints</a></div><div class="ttdeci">void sendEndpoints()</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01355">OverlayImpl.cpp:1355</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a8314d9411ae5be655929354317b4693b"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a8314d9411ae5be655929354317b4693b">ripple::OverlayImpl::remove</a></div><div class="ttdeci">void remove(std::shared_ptr< PeerFinder::Slot > const &slot)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00473">OverlayImpl.cpp:473</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a8314d9411ae5be655929354317b4693b"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a8314d9411ae5be655929354317b4693b">ripple::OverlayImpl::remove</a></div><div class="ttdeci">void remove(std::shared_ptr< PeerFinder::Slot > const &slot)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00474">OverlayImpl.cpp:474</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a888034ddee3c571ada36fe175953425b"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a888034ddee3c571ada36fe175953425b">ripple::OverlayImpl::OverlayImpl</a></div><div class="ttdeci">OverlayImpl(Application &app, Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_context &io_context, BasicConfig const &config, beast::insight::Collector::ptr const &collector)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00121">OverlayImpl.cpp:121</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a8bbec612a0dcbaad4916115b95d3b237"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a8bbec612a0dcbaad4916115b95d3b237">ripple::OverlayImpl::sendTxQueue</a></div><div class="ttdeci">void sendTxQueue()</div><div class="ttdoc">Send once a second transactions' hashes aggregated by peers.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01373">OverlayImpl.cpp:1373</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a8e09355c28f5d8cb0d477453b74f23e9"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a8e09355c28f5d8cb0d477453b74f23e9">ripple::OverlayImpl::reportOutboundTraffic</a></div><div class="ttdeci">void reportOutboundTraffic(TrafficCount::category cat, int bytes)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00701">OverlayImpl.cpp:701</a></div></div>
|
||||
@@ -1914,16 +1915,16 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a98a077168a135ac114235f3e055fd5b3"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a98a077168a135ac114235f3e055fd5b3">ripple::OverlayImpl::size</a></div><div class="ttdeci">std::size_t size() const override</div><div class="ttdoc">The number of active peers on the network Active peers are only those peers that have completed the h...</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00710">OverlayImpl.cpp:710</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a991d6c6966099b83b4f6c9e8c87e51f6"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a991d6c6966099b83b4f6c9e8c87e51f6">ripple::OverlayImpl::strand_</a></div><div class="ttdeci">boost::asio::strand< boost::asio::io_context::executor_type > strand_</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00108">OverlayImpl.h:108</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a9bffa5dc79c7be0b7c4c75cce173ad2a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a9bffa5dc79c7be0b7c4c75cce173ad2a">ripple::OverlayImpl::unsquelch</a></div><div class="ttdeci">void unsquelch(PublicKey const &validator, Peer::id_t id) const override</div><div class="ttdoc">Unsquelch handler.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01396">OverlayImpl.cpp:1396</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a9f6861b0fb2805bb479f316f1d0d2bc2"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2">ripple::OverlayImpl::makeRedirectResponse</a></div><div class="ttdeci">std::shared_ptr< Writer > makeRedirectResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00349">OverlayImpl.cpp:349</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_a9f6861b0fb2805bb479f316f1d0d2bc2"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#a9f6861b0fb2805bb479f316f1d0d2bc2">ripple::OverlayImpl::makeRedirectResponse</a></div><div class="ttdeci">std::shared_ptr< Writer > makeRedirectResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00351">OverlayImpl.cpp:351</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_aa19d6ef2edeaea889ff6199f82747bcc"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#aa19d6ef2edeaea889ff6199f82747bcc">ripple::OverlayImpl::for_each</a></div><div class="ttdeci">void for_each(UnaryFunc &&f) const</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00281">OverlayImpl.h:281</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_aaa55667827e740d1a2fbcd7c5c9fb8b3"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#aaa55667827e740d1a2fbcd7c5c9fb8b3">ripple::OverlayImpl::getOverlayInfo</a></div><div class="ttdeci">Json::Value getOverlayInfo()</div><div class="ttdoc">Returns information about peers on the overlay network.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00723">OverlayImpl.cpp:723</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ab1de6dfed841c59d844973a6196454a3"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ab1de6dfed841c59d844973a6196454a3">ripple::OverlayImpl::resourceManager</a></div><div class="ttdeci">Resource::Manager & resourceManager()</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00170">OverlayImpl.h:170</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_abcf430bc5f040cff77dd77b7c56a652f"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#abcf430bc5f040cff77dd77b7c56a652f">ripple::OverlayImpl::isPeerUpgrade</a></div><div class="ttdeci">static bool isPeerUpgrade(http_request_type const &request)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00332">OverlayImpl.cpp:332</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_abcf430bc5f040cff77dd77b7c56a652f"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#abcf430bc5f040cff77dd77b7c56a652f">ripple::OverlayImpl::isPeerUpgrade</a></div><div class="ttdeci">static bool isPeerUpgrade(http_request_type const &request)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00334">OverlayImpl.cpp:334</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac0b788dddf0076d5d5aa7f21c4c434a5"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac0b788dddf0076d5d5aa7f21c4c434a5">ripple::OverlayImpl::getServerCounts</a></div><div class="ttdeci">Json::Value getServerCounts()</div><div class="ttdoc">Returns information about the local server's performance counters.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00796">OverlayImpl.cpp:796</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac2075504b47e3bae8cfc41850fe8ce9a"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac2075504b47e3bae8cfc41850fe8ce9a">ripple::OverlayImpl::reportInboundTraffic</a></div><div class="ttdeci">void reportInboundTraffic(TrafficCount::category cat, int bytes)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00695">OverlayImpl.cpp:695</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac34dd8726bb45f185a89f0027a259ad8"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac34dd8726bb45f185a89f0027a259ad8">ripple::OverlayImpl::onManifests</a></div><div class="ttdeci">void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00639">OverlayImpl.cpp:639</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac68cea45e3ecdc66943099632d2c8621"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac68cea45e3ecdc66943099632d2c8621">ripple::OverlayImpl::m_peerFinder</a></div><div class="ttdeci">std::unique_ptr< PeerFinder::Manager > m_peerFinder</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00117">OverlayImpl.h:117</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac74b1afabc6ab8f758a2566d51c51e36"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac74b1afabc6ab8f758a2566d51c51e36">ripple::OverlayImpl::connect</a></div><div class="ttdeci">void connect(beast::IP::Endpoint const &remote_endpoint) override</div><div class="ttdoc">Establish a peer connection to the specified endpoint.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00396">OverlayImpl.cpp:396</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac74b1afabc6ab8f758a2566d51c51e36"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac74b1afabc6ab8f758a2566d51c51e36">ripple::OverlayImpl::connect</a></div><div class="ttdeci">void connect(beast::IP::Endpoint const &remote_endpoint) override</div><div class="ttdoc">Establish a peer connection to the specified endpoint.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00398">OverlayImpl.cpp:398</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac7a4d439587511364b72808ed8eb486e"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac7a4d439587511364b72808ed8eb486e">ripple::OverlayImpl::onHandoff</a></div><div class="ttdeci">Handoff onHandoff(std::unique_ptr< stream_type > &&bundle, http_request_type &&request, endpoint_type remote_endpoint) override</div><div class="ttdoc">Conditionally accept an incoming HTTP request.</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00165">OverlayImpl.cpp:165</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac8045b4d61dfca7e767a5502ff06f117"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac8045b4d61dfca7e767a5502ff06f117">ripple::OverlayImpl::setup</a></div><div class="ttdeci">Setup const & setup() const</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8h_source.html#l00176">OverlayImpl.h:176</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1OverlayImpl_html_ac9dcdbe7f5e3cdb19fa1c7d71538556b"><div class="ttname"><a href="classripple_1_1OverlayImpl.html#ac9dcdbe7f5e3cdb19fa1c7d71538556b">ripple::OverlayImpl::autoConnect</a></div><div class="ttdeci">void autoConnect()</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l01347">OverlayImpl.cpp:1347</a></div></div>
|
||||
@@ -1944,7 +1945,7 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1Overlay_html"><div class="ttname"><a href="classripple_1_1Overlay.html">ripple::Overlay</a></div><div class="ttdoc">Manages the set of connected peers.</div><div class="ttdef"><b>Definition</b> <a href="Overlay_8h_source.html#l00048">Overlay.h:49</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerFinder_1_1Manager_html_a0b963fb66bf565dbbce628683be995ed"><div class="ttname"><a href="classripple_1_1PeerFinder_1_1Manager.html#a0b963fb66bf565dbbce628683be995ed">ripple::PeerFinder::Manager::new_outbound_slot</a></div><div class="ttdeci">virtual std::pair< std::shared_ptr< Slot >, Result > new_outbound_slot(beast::IP::Endpoint const &remote_endpoint)=0</div><div class="ttdoc">Create a new outbound slot with the specified remote endpoint.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1PeerReservationTable_html_a798360d75065f1106fbe581af2381599"><div class="ttname"><a href="classripple_1_1PeerReservationTable.html#a798360d75065f1106fbe581af2381599">ripple::PeerReservationTable::contains</a></div><div class="ttdeci">bool contains(PublicKey const &nodeId)</div><div class="ttdef"><b>Definition</b> <a href="PeerReservationTable_8h_source.html#l00088">PeerReservationTable.h:88</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#l00060">PublicKey.h:61</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#l00061">PublicKey.h:62</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1Resolver_html"><div class="ttname"><a href="classripple_1_1Resolver.html">ripple::Resolver</a></div><div class="ttdef"><b>Definition</b> <a href="Resolver_8h_source.html#l00030">Resolver.h:31</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1Resolver_html_a2b7ea0953f182de10d6d5818e6b26874"><div class="ttname"><a href="classripple_1_1Resolver.html#a2b7ea0953f182de10d6d5818e6b26874">ripple::Resolver::resolve</a></div><div class="ttdeci">void resolve(std::vector< std::string > const &names, Handler handler)</div><div class="ttdoc">resolve all hostnames on the list</div><div class="ttdef"><b>Definition</b> <a href="Resolver_8h_source.html#l00057">Resolver.h:57</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1Resource_1_1Manager_html"><div class="ttname"><a href="classripple_1_1Resource_1_1Manager.html">ripple::Resource::Manager</a></div><div class="ttdoc">Tracks load and resource consumption.</div><div class="ttdef"><b>Definition</b> <a href="ResourceManager_8h_source.html#l00037">ResourceManager.h:38</a></div></div>
|
||||
@@ -1959,9 +1960,9 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="aclassripple_1_1TrafficCount_html_adbaee77c7a063c9aac783e54594aeda7"><div class="ttname"><a href="classripple_1_1TrafficCount.html#adbaee77c7a063c9aac783e54594aeda7">ripple::TrafficCount::category</a></div><div class="ttdeci">category</div><div class="ttdef"><b>Definition</b> <a href="TrafficCount_8h_source.html#l00087">TrafficCount.h:87</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1TrafficCount_html_adbaee77c7a063c9aac783e54594aeda7a3d8952692d4bd64cfa191583257cf404"><div class="ttname"><a href="classripple_1_1TrafficCount.html#adbaee77c7a063c9aac783e54594aeda7a3d8952692d4bd64cfa191583257cf404">ripple::TrafficCount::squelch_ignored</a></div><div class="ttdeci">@ squelch_ignored</div><div class="ttdef"><b>Definition</b> <a href="TrafficCount_8h_source.html#l00112">TrafficCount.h:112</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1TrafficCount_html_adc6e6ac1abf15832d2177ec1cfb32d24"><div class="ttname"><a href="classripple_1_1TrafficCount.html#adc6e6ac1abf15832d2177ec1cfb32d24">ripple::TrafficCount::addCount</a></div><div class="ttdeci">void addCount(category cat, bool inbound, int bytes)</div><div class="ttdoc">Account for traffic associated with the given category.</div><div class="ttdef"><b>Definition</b> <a href="TrafficCount_8h_source.html#l00214">TrafficCount.h:214</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorList_html_a5b0d33cb960903cc89ba236178e0247b"><div class="ttname"><a href="classripple_1_1ValidatorList.html#a5b0d33cb960903cc89ba236178e0247b">ripple::ValidatorList::listed</a></div><div class="ttdeci">bool listed(PublicKey const &identity) const</div><div class="ttdoc">Returns true if public key is included on any lists.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorList_8cpp_source.html#l01455">ValidatorList.cpp:1455</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorList_html_a62f2c33d93c3985c6c486a9bfc6499fe"><div class="ttname"><a href="classripple_1_1ValidatorList.html#a62f2c33d93c3985c6c486a9bfc6499fe">ripple::ValidatorList::getAvailable</a></div><div class="ttdeci">std::optional< Json::Value > getAvailable(std::string_view pubKey, std::optional< std::uint32_t > forceVersion={})</div><div class="ttdoc">Returns the current valid list for the given publisher key, if available, as a Json object.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorList_8cpp_source.html#l01801">ValidatorList.cpp:1801</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorList_html_a6f943a4488f3b50dcbb5177007d43271"><div class="ttname"><a href="classripple_1_1ValidatorList.html#a6f943a4488f3b50dcbb5177007d43271">ripple::ValidatorList::getJson</a></div><div class="ttdeci">Json::Value getJson() const</div><div class="ttdoc">Return a JSON representation of the state of the validator list.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorList_8cpp_source.html#l01629">ValidatorList.cpp:1629</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorList_html_a5b0d33cb960903cc89ba236178e0247b"><div class="ttname"><a href="classripple_1_1ValidatorList.html#a5b0d33cb960903cc89ba236178e0247b">ripple::ValidatorList::listed</a></div><div class="ttdeci">bool listed(PublicKey const &identity) const</div><div class="ttdoc">Returns true if public key is included on any lists.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorList_8cpp_source.html#l01452">ValidatorList.cpp:1452</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorList_html_a62f2c33d93c3985c6c486a9bfc6499fe"><div class="ttname"><a href="classripple_1_1ValidatorList.html#a62f2c33d93c3985c6c486a9bfc6499fe">ripple::ValidatorList::getAvailable</a></div><div class="ttdeci">std::optional< Json::Value > getAvailable(std::string_view pubKey, std::optional< std::uint32_t > forceVersion={})</div><div class="ttdoc">Returns the current valid list for the given publisher key, if available, as a Json object.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorList_8cpp_source.html#l01798">ValidatorList.cpp:1798</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorList_html_a6f943a4488f3b50dcbb5177007d43271"><div class="ttname"><a href="classripple_1_1ValidatorList.html#a6f943a4488f3b50dcbb5177007d43271">ripple::ValidatorList::getJson</a></div><div class="ttdeci">Json::Value getJson() const</div><div class="ttdoc">Return a JSON representation of the state of the validator list.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorList_8cpp_source.html#l01626">ValidatorList.cpp:1626</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ValidatorSite_html_a312f364fbd7a199243881139578c9ac7"><div class="ttname"><a href="classripple_1_1ValidatorSite.html#a312f364fbd7a199243881139578c9ac7">ripple::ValidatorSite::getJson</a></div><div class="ttdeci">Json::Value getJson() const</div><div class="ttdoc">Return JSON representation of configured validator sites.</div><div class="ttdef"><b>Definition</b> <a href="ValidatorSite_8cpp_source.html#l00672">ValidatorSite.cpp:672</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="acount_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/set/count.html">std::set::count</a></div><div class="ttdeci">T count(T... args)</div></div>
|
||||
@@ -1994,10 +1995,8 @@ $(document).ready(function() { init_codefold(0); });
|
||||
<div class="ttc" id="anamespaceripple_1_1CrawlOptions_html_a88da1dd344ca0dc87a10a49f34fa38daab5a8c7424367f8d9d06a3b00cee846f4"><div class="ttname"><a href="namespaceripple_1_1CrawlOptions.html#a88da1dd344ca0dc87a10a49f34fa38daab5a8c7424367f8d9d06a3b00cee846f4">ripple::CrawlOptions::Disabled</a></div><div class="ttdeci">@ Disabled</div><div class="ttdef"><b>Definition</b> <a href="OverlayImpl_8cpp_source.html#l00050">OverlayImpl.cpp:50</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1Tuning_html_a8e0bd99f9cf1667e6f6dc82b8b369f41a253dac09e40a5b8076dc4ea672e6aba7"><div class="ttname"><a href="namespaceripple_1_1Tuning.html#a8e0bd99f9cf1667e6f6dc82b8b369f41a253dac09e40a5b8076dc4ea672e6aba7">ripple::Tuning::checkIdlePeers</a></div><div class="ttdeci">@ checkIdlePeers</div><div class="ttdoc">How often we check for idle peers (seconds)</div><div class="ttdef"><b>Definition</b> <a href="src_2xrpld_2overlay_2detail_2Tuning_8h_source.html#l00058">src/xrpld/overlay/detail/Tuning.h:58</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_html_a08a13b62b18272366f788632359e8793"><div class="ttname"><a href="namespaceripple.html#a08a13b62b18272366f788632359e8793">ripple::toBase58</a></div><div class="ttdeci">std::string toBase58(AccountID const &v)</div><div class="ttdoc">Convert AccountID to base58 checked string.</div><div class="ttdef"><b>Definition</b> <a href="AccountID_8cpp_source.html#l00114">AccountID.cpp:114</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a0a6d7ab3fd095a10fd8bd6d140dcd55b"><div class="ttname"><a href="namespaceripple.html#a0a6d7ab3fd095a10fd8bd6d140dcd55b">ripple::negotiateProtocolVersion</a></div><div class="ttdeci">std::optional< ProtocolVersion > negotiateProtocolVersion(std::vector< ProtocolVersion > const &versions)</div><div class="ttdoc">Given a list of supported protocol versions, choose the one we prefer.</div><div class="ttdef"><b>Definition</b> <a href="ProtocolVersion_8cpp_source.html#l00128">ProtocolVersion.cpp:128</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a12a05294e1d72bbcf9718dc99195ad19"><div class="ttname"><a href="namespaceripple.html#a12a05294e1d72bbcf9718dc99195ad19">ripple::deserializeManifest</a></div><div class="ttdeci">std::optional< Manifest > deserializeManifest(Slice s, beast::Journal journal)</div><div class="ttdoc">Constructs Manifest from serialized string.</div><div class="ttdef"><b>Definition</b> <a href="Manifest_8cpp_source.html#l00054">Manifest.cpp:54</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a1bf8df553d36589191c8057c136cce03ac3fe5edb1f8a81a8e585f6a27c120be6"><div class="ttname"><a href="namespaceripple.html#a1bf8df553d36589191c8057c136cce03ac3fe5edb1f8a81a8e585f6a27c120be6">ripple::TokenType::NodePublic</a></div><div class="ttdeci">@ NodePublic</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a217d4fd0d78a4f83214976e1b25f31eb"><div class="ttname"><a href="namespaceripple.html#a217d4fd0d78a4f83214976e1b25f31eb">ripple::parseProtocolVersions</a></div><div class="ttdeci">std::vector< ProtocolVersion > parseProtocolVersions(boost::beast::string_view const &value)</div><div class="ttdoc">Parse a set of protocol versions.</div><div class="ttdef"><b>Definition</b> <a href="ProtocolVersion_8cpp_source.html#l00081">ProtocolVersion.cpp:81</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a2e1e308b7a19c6ae68201ce583ced433"><div class="ttname"><a href="namespaceripple.html#a2e1e308b7a19c6ae68201ce583ced433">ripple::isPseudoTx</a></div><div class="ttdeci">bool isPseudoTx(STObject const &tx)</div><div class="ttdoc">Check whether a transaction is a pseudo-transaction.</div><div class="ttdef"><b>Definition</b> <a href="STTx_8cpp_source.html#l00820">STTx.cpp:820</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a53836f0b1a1019c51a41955b523d8b45"><div class="ttname"><a href="namespaceripple.html#a53836f0b1a1019c51a41955b523d8b45">ripple::addValidatorManifest</a></div><div class="ttdeci">void addValidatorManifest(soci::session &session, std::string const &serialized)</div><div class="ttdoc">addValidatorManifest Saves the manifest of a validator to the database.</div><div class="ttdef"><b>Definition</b> <a href="Wallet_8cpp_source.html#l00119">Wallet.cpp:119</a></div></div>
|
||||
|
||||
Reference in New Issue
Block a user