Files
rippled/structripple_1_1test_1_1TestPeerSet.html
2021-09-14 16:34:03 +00:00

472 lines
30 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: ripple::test::TestPeerSet Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceripple.html">ripple</a></li><li class="navelem"><a class="el" href="namespaceripple_1_1test.html">test</a></li><li class="navelem"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html">TestPeerSet</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structripple_1_1test_1_1TestPeerSet-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ripple::test::TestPeerSet Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Simulate a peerSet that supplies peers to ledger replay subtasks.
<a href="structripple_1_1test_1_1TestPeerSet.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for ripple::test::TestPeerSet:</div>
<div class="dyncontent">
<div class="center"><img src="structripple_1_1test_1_1TestPeerSet__inherit__graph.png" border="0" usemap="#ripple_1_1test_1_1TestPeerSet_inherit__map" alt="Inheritance graph"/></div>
<map name="ripple_1_1test_1_1TestPeerSet_inherit__map" id="ripple_1_1test_1_1TestPeerSet_inherit__map">
<area shape="rect" title="Simulate a peerSet that supplies peers to ledger replay subtasks." alt="" coords="5,80,181,107"/>
<area shape="rect" href="classripple_1_1PeerSet.html" title="Supports data retrieval by managing a set of peers." alt="" coords="35,5,152,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ripple::test::TestPeerSet:</div>
<div class="dyncontent">
<div class="center"><img src="structripple_1_1test_1_1TestPeerSet__coll__graph.png" border="0" usemap="#ripple_1_1test_1_1TestPeerSet_coll__map" alt="Collaboration graph"/></div>
<map name="ripple_1_1test_1_1TestPeerSet_coll__map" id="ripple_1_1test_1_1TestPeerSet_coll__map">
<area shape="rect" title="Simulate a peerSet that supplies peers to ledger replay subtasks." alt="" coords="3813,119,3989,145"/>
<area shape="rect" href="classripple_1_1PeerSet.html" title="Supports data retrieval by managing a set of peers." alt="" coords="1315,465,1432,492"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html" title=" " alt="" coords="1602,570,1773,611"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="3480,17,3651,58"/>
<area shape="rect" href="classripple_1_1test_1_1TestPeer.html" title="Simulate a network peer." alt="" coords="3126,5,3281,32"/>
<area shape="rect" href="classripple_1_1Peer.html" title="Represents a peer connection in the overlay." alt="" coords="2765,5,2861,32"/>
<area shape="rect" href="classripple_1_1LedgerReplayMsgHandler.html" title=" " alt="" coords="3449,119,3681,145"/>
<area shape="rect" href="classripple_1_1Application.html" title=" " alt="" coords="1303,279,1443,305"/>
<area shape="rect" href="classripple_1_1LedgerReplayer.html" title="Manages the lifetime of ledger replay tasks." alt="" coords="3119,717,3287,744"/>
<area shape="rect" href="classripple_1_1TimeoutCounter.html" title="This class is an &quot;active&quot; object." alt="" coords="1601,636,1773,663"/>
<area shape="rect" href="classbeast_1_1PropertyStream_1_1Source.html" title="Subclasses can be called to write to a stream and have children." alt="" coords="889,427,1057,469"/>
<area shape="rect" href="classbeast_1_1PropertyStream_1_1Item.html" title=" " alt="" coords="1289,390,1457,431"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/recursive_mutex.html" title="STL class." alt="" coords="576,544,735,571"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/string/basic_string.html" title="STL class." alt="" coords="612,417,699,444"/>
<area shape="rect" href="classbeast_1_1List.html" title=" " alt="" coords="563,474,748,515"/>
<area shape="rect" href="classbeast_1_1detail_1_1ListNode.html" title=" " alt="" coords="275,467,457,523"/>
<area shape="rect" href="classbeast_1_1detail_1_1ListNode.html" title=" " alt="" coords="5,474,173,515"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/types/size_t.html" title=" " alt="" coords="322,575,410,601"/>
<area shape="rect" href="classripple_1_1base__uint.html" title="Integers of any length that is a multiple of 32&#45;bits." alt="" coords="1303,730,1444,771"/>
<area shape="rect" title=" " alt="" coords="900,329,1047,356"/>
<area shape="rect" href="classripple_1_1LedgerReplayTask.html" title=" " alt="" coords="3473,1143,3657,1169"/>
<area shape="rect" href="classripple_1_1InboundLedgers.html" title="Manages the lifetime of inbound ledgers." alt="" coords="1602,1159,1773,1185"/>
<area shape="rect" href="classripple_1_1SkipListAcquire.html" title="Manage the retrieval of a skip list in a ledger from the network." alt="" coords="2018,959,2185,985"/>
<area shape="rect" href="classripple_1_1LedgerDeltaAcquire.html" title="Manage the retrieval of a ledger delta (header and transactions) from the network." alt="" coords="2004,529,2199,556"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/unordered_map.html" title=" " alt="" coords="2729,819,2896,890"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/unordered_map.html" title=" " alt="" coords="2719,607,2907,678"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/array.html" title=" " alt="" coords="889,759,1057,801"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/types/integer.html" title=" " alt="" coords="604,801,707,828"/>
<area shape="rect" href="classripple_1_1LedgerReplayTask_1_1TaskParameter.html" title=" " alt="" coords="1081,1158,1265,1199"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/weak_ptr.html" title=" " alt="" coords="2332,865,2495,906"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="2524,1046,2695,1087"/>
<area shape="rect" href="classbeast_1_1Journal.html" title="A generic endpoint for log messages." alt="" coords="1318,119,1429,145"/>
<area shape="rect" href="classbeast_1_1Journal_1_1Sink.html" title="Abstraction for the underlying message destination." alt="" coords="900,119,1047,145"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/enable_shared_from_this.html" title=" " alt="" coords="1577,947,1798,989"/>
<area shape="rect" href="classripple_1_1CountedObject.html" title=" " alt="" coords="1606,1013,1769,1054"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="1577,1079,1797,1135"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/vector.html" title=" " alt="" coords="1586,687,1789,713"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html" title=" " alt="" coords="2727,754,2898,795"/>
<area shape="rect" href="classripple_1_1PeerSetBuilder.html" title=" " alt="" coords="2332,761,2495,788"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/mutex.html" title="STL class." alt="" coords="2767,703,2859,729"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/vector.html" title=" " alt="" coords="4103,770,4357,811"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="3816,906,3987,947"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/enable_shared_from_this.html" title=" " alt="" coords="3084,1339,3323,1381"/>
<area shape="rect" href="classripple_1_1CountedObject.html" title=" " alt="" coords="3119,1106,3288,1147"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/vector.html" title=" " alt="" coords="3071,1274,3336,1315"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="1602,1214,1773,1255"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/weak_ptr.html" title=" " alt="" coords="2327,579,2500,621"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/enable_shared_from_this.html" title=" " alt="" coords="1563,453,1812,494"/>
<area shape="rect" href="classripple_1_1CountedObject.html" title=" " alt="" coords="1597,322,1777,363"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/set.html" title=" " alt="" coords="1597,387,1778,429"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6a72d6274a497c5c6b7a2b5d59519d85"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#a6a72d6274a497c5c6b7a2b5d59519d85">TestPeerSet</a> (<a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a> &amp;me, <a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a> &amp;other, <a class="el" href="namespaceripple_1_1test.html#a6e324fd8fc463ac8f4a1d1a185511db1">PeerSetBehavior</a> bhvr, bool enableLedgerReplay)</td></tr>
<tr class="separator:a6a72d6274a497c5c6b7a2b5d59519d85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24a2832c1d285a0c81fb5411792645b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#a24a2832c1d285a0c81fb5411792645b8">addPeers</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> limit, <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt; bool(<a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;)&gt; hasItem, <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt; void(<a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;)&gt; onPeerAdded) override</td></tr>
<tr class="memdesc:a24a2832c1d285a0c81fb5411792645b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Try add more peers. <a href="structripple_1_1test_1_1TestPeerSet.html#a24a2832c1d285a0c81fb5411792645b8">More...</a><br /></td></tr>
<tr class="separator:a24a2832c1d285a0c81fb5411792645b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cd356ffd4275c4238124677dbe992d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#a7cd356ffd4275c4238124677dbe992d3">sendRequest</a> (::google::protobuf::Message const &amp;msg, protocol::MessageType type, <a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;peer) override</td></tr>
<tr class="separator:a7cd356ffd4275c4238124677dbe992d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ea181601c1776afa9047bb9d5c9e2ea"><td class="memItemLeft" align="right" valign="top">const <a class="elRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a>&lt; <a class="el" href="classripple_1_1Peer.html#a56cc3cdd9c73921f23cb43a2bfa696a1">Peer::id_t</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#a0ea181601c1776afa9047bb9d5c9e2ea">getPeerIds</a> () const override</td></tr>
<tr class="memdesc:a0ea181601c1776afa9047bb9d5c9e2ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the set of ids of previously added peers <a href="structripple_1_1test_1_1TestPeerSet.html#a0ea181601c1776afa9047bb9d5c9e2ea">More...</a><br /></td></tr>
<tr class="separator:a0ea181601c1776afa9047bb9d5c9e2ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a751ba29d7fa5e1411ddd406e84f84d67"><td class="memTemplParams" colspan="2">template&lt;typename MessageType &gt; </td></tr>
<tr class="memitem:a751ba29d7fa5e1411ddd406e84f84d67"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67">sendRequest</a> (MessageType const &amp;message, <a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;peer)</td></tr>
<tr class="memdesc:a751ba29d7fa5e1411ddd406e84f84d67"><td class="mdescLeft">&#160;</td><td class="mdescRight">send a message <a href="classripple_1_1PeerSet.html#a751ba29d7fa5e1411ddd406e84f84d67">More...</a><br /></td></tr>
<tr class="separator:a751ba29d7fa5e1411ddd406e84f84d67"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af1310036749ef7c1dde3ade149e9c281"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#af1310036749ef7c1dde3ade149e9c281">local</a></td></tr>
<tr class="separator:af1310036749ef7c1dde3ade149e9c281"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c3a351bb9f2eefa2a86787961cceacb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#a5c3a351bb9f2eefa2a86787961cceacb">remote</a></td></tr>
<tr class="separator:a5c3a351bb9f2eefa2a86787961cceacb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8c75a40184be023eec9d78417a8c7df"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1test_1_1TestPeer.html">TestPeer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#af8c75a40184be023eec9d78417a8c7df">dummyPeer</a></td></tr>
<tr class="separator:af8c75a40184be023eec9d78417a8c7df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a799f6f0f5bef6d61cccd769ecd2eb026"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceripple_1_1test.html#a6e324fd8fc463ac8f4a1d1a185511db1">PeerSetBehavior</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1test_1_1TestPeerSet.html#a799f6f0f5bef6d61cccd769ecd2eb026">behavior</a></td></tr>
<tr class="separator:a799f6f0f5bef6d61cccd769ecd2eb026"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Simulate a peerSet that supplies peers to ledger replay subtasks. </p>
<p>It connects the ledger replay client side and server side message handlers. Depending on the configured PeerSetBehavior, it may drop or repeat some of the messages. </p>
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00328">328</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a6a72d6274a497c5c6b7a2b5d59519d85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a72d6274a497c5c6b7a2b5d59519d85">&#9670;&nbsp;</a></span>TestPeerSet()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ripple::test::TestPeerSet::TestPeerSet </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a> &amp;&#160;</td>
<td class="paramname"><em>me</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a> &amp;&#160;</td>
<td class="paramname"><em>other</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespaceripple_1_1test.html#a6e324fd8fc463ac8f4a1d1a185511db1">PeerSetBehavior</a>&#160;</td>
<td class="paramname"><em>bhvr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enableLedgerReplay</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00330">330</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a24a2832c1d285a0c81fb5411792645b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24a2832c1d285a0c81fb5411792645b8">&#9670;&nbsp;</a></span>addPeers()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ripple::test::TestPeerSet::addPeers </td>
<td>(</td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a>&#160;</td>
<td class="paramname"><em>limit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt; bool(<a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;)&gt;&#160;</td>
<td class="paramname"><em>hasItem</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt; void(<a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;)&gt;&#160;</td>
<td class="paramname"><em>onPeerAdded</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Try add more peers. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">limit</td><td>number of peers to add </td></tr>
<tr><td class="paramname">hasItem</td><td>callback that helps to select peers </td></tr>
<tr><td class="paramname">onPeerAdded</td><td>callback called when a peer is added </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classripple_1_1PeerSet.html#a3ec0f2c9ea5c123121145dfc61388c12">ripple::PeerSet</a>.</p>
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00343">343</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<a id="a7cd356ffd4275c4238124677dbe992d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cd356ffd4275c4238124677dbe992d3">&#9670;&nbsp;</a></span>sendRequest() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ripple::test::TestPeerSet::sendRequest </td>
<td>(</td>
<td class="paramtype">::google::protobuf::Message const &amp;&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">protocol::MessageType&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;&#160;</td>
<td class="paramname"><em>peer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Implements <a class="el" href="classripple_1_1PeerSet.html#a91ee198dcb5053d841a2d220ca662ba7">ripple::PeerSet</a>.</p>
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00353">353</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<a id="a0ea181601c1776afa9047bb9d5c9e2ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ea181601c1776afa9047bb9d5c9e2ea">&#9670;&nbsp;</a></span>getPeerIds()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="elRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a>&lt;<a class="el" href="classripple_1_1Peer.html#a56cc3cdd9c73921f23cb43a2bfa696a1">Peer::id_t</a>&gt;&amp; ripple::test::TestPeerSet::getPeerIds </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get the set of ids of previously added peers </p>
<p>Implements <a class="el" href="classripple_1_1PeerSet.html#acea4771f14e9825928b161d568c0911f">ripple::PeerSet</a>.</p>
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00399">399</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<a id="a751ba29d7fa5e1411ddd406e84f84d67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a751ba29d7fa5e1411ddd406e84f84d67">&#9670;&nbsp;</a></span>sendRequest() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MessageType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ripple::PeerSet::sendRequest </td>
<td>(</td>
<td class="paramtype">MessageType const &amp;&#160;</td>
<td class="paramname"><em>message</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="classripple_1_1Peer.html">Peer</a> &gt; const &amp;&#160;</td>
<td class="paramname"><em>peer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>send a message </p>
<p class="definition">Definition at line <a class="el" href="PeerSet_8h_source.html#l00064">64</a> of file <a class="el" href="PeerSet_8h_source.html">PeerSet.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af1310036749ef7c1dde3ade149e9c281"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1310036749ef7c1dde3ade149e9c281">&#9670;&nbsp;</a></span>local</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a>&amp; ripple::test::TestPeerSet::local</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00405">405</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<a id="a5c3a351bb9f2eefa2a86787961cceacb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c3a351bb9f2eefa2a86787961cceacb">&#9670;&nbsp;</a></span>remote</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classripple_1_1LedgerReplayMsgHandler.html">LedgerReplayMsgHandler</a>&amp; ripple::test::TestPeerSet::remote</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00406">406</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<a id="af8c75a40184be023eec9d78417a8c7df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8c75a40184be023eec9d78417a8c7df">&#9670;&nbsp;</a></span>dummyPeer</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt;<a class="el" href="classripple_1_1test_1_1TestPeer.html">TestPeer</a>&gt; ripple::test::TestPeerSet::dummyPeer</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00407">407</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
<a id="a799f6f0f5bef6d61cccd769ecd2eb026"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a799f6f0f5bef6d61cccd769ecd2eb026">&#9670;&nbsp;</a></span>behavior</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceripple_1_1test.html#a6e324fd8fc463ac8f4a1d1a185511db1">PeerSetBehavior</a> ripple::test::TestPeerSet::behavior</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="LedgerReplay__test_8cpp_source.html#l00408">408</a> of file <a class="el" href="LedgerReplay__test_8cpp_source.html">LedgerReplay_test.cpp</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>