Files
rippled/classripple_1_1test_1_1WSClient.html
2021-03-12 22:34:28 +00:00

271 lines
15 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::WSClient Class 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="classripple_1_1test_1_1WSClient.html">WSClient</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classripple_1_1test_1_1WSClient-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ripple::test::WSClient Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for ripple::test::WSClient:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1test_1_1WSClient__inherit__graph.png" border="0" usemap="#ripple_1_1test_1_1WSClient_inherit__map" alt="Inheritance graph"/></div>
<map name="ripple_1_1test_1_1WSClient_inherit__map" id="ripple_1_1test_1_1WSClient_inherit__map">
<area shape="rect" title=" " alt="" coords="22,80,181,107"/>
<area shape="rect" href="classripple_1_1test_1_1WSClientImpl.html" title=" " alt="" coords="7,155,195,181"/>
<area shape="rect" href="classripple_1_1test_1_1AbstractClient.html" title=" " alt="" coords="5,5,197,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ripple::test::WSClient:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1test_1_1WSClient__coll__graph.png" border="0" usemap="#ripple_1_1test_1_1WSClient_coll__map" alt="Collaboration graph"/></div>
<map name="ripple_1_1test_1_1WSClient_coll__map" id="ripple_1_1test_1_1WSClient_coll__map">
<area shape="rect" title=" " alt="" coords="22,80,181,107"/>
<area shape="rect" href="classripple_1_1test_1_1AbstractClient.html" title=" " alt="" coords="5,5,197,32"/>
</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:a18715d15a0c71b3f9dd79bc728bf9a91"><td class="memItemLeft" align="right" valign="top">virtual <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional</a>&lt; <a class="el" href="classJson_1_1Value.html">Json::Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1test_1_1WSClient.html#a18715d15a0c71b3f9dd79bc728bf9a91">getMsg</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a> const &amp;timeout=<a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a>{ 0})=0</td></tr>
<tr class="memdesc:a18715d15a0c71b3f9dd79bc728bf9a91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a message. <a href="classripple_1_1test_1_1WSClient.html#a18715d15a0c71b3f9dd79bc728bf9a91">More...</a><br /></td></tr>
<tr class="separator:a18715d15a0c71b3f9dd79bc728bf9a91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6bc924603b7952aceae79db489572ce"><td class="memItemLeft" align="right" valign="top">virtual <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional</a>&lt; <a class="el" href="classJson_1_1Value.html">Json::Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1test_1_1WSClient.html#ac6bc924603b7952aceae79db489572ce">findMsg</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a> const &amp;timeout, <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt; bool(<a class="el" href="classJson_1_1Value.html">Json::Value</a> const &amp;)&gt; pred)=0</td></tr>
<tr class="memdesc:ac6bc924603b7952aceae79db489572ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a message that meets the predicate criteria. <a href="classripple_1_1test_1_1WSClient.html#ac6bc924603b7952aceae79db489572ce">More...</a><br /></td></tr>
<tr class="separator:ac6bc924603b7952aceae79db489572ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48e55a0ee80a76c782d40f1d055f0d55"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classJson_1_1Value.html">Json::Value</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1test_1_1AbstractClient.html#a48e55a0ee80a76c782d40f1d055f0d55">invoke</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> const &amp;cmd, <a class="el" href="classJson_1_1Value.html">Json::Value</a> const &amp;params={})=0</td></tr>
<tr class="memdesc:a48e55a0ee80a76c782d40f1d055f0d55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Submit a command synchronously. <a href="classripple_1_1test_1_1AbstractClient.html#a48e55a0ee80a76c782d40f1d055f0d55">More...</a><br /></td></tr>
<tr class="separator:a48e55a0ee80a76c782d40f1d055f0d55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3245f799f5c542b353b61b94292d6ad9"><td class="memItemLeft" align="right" valign="top">virtual unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1test_1_1AbstractClient.html#a3245f799f5c542b353b61b94292d6ad9">version</a> () const =0</td></tr>
<tr class="memdesc:a3245f799f5c542b353b61b94292d6ad9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get <a class="el" href="namespaceripple_1_1RPC.html">RPC</a> 1.0 or <a class="el" href="namespaceripple_1_1RPC.html">RPC</a> 2.0. <a href="classripple_1_1test_1_1AbstractClient.html#a3245f799f5c542b353b61b94292d6ad9">More...</a><br /></td></tr>
<tr class="separator:a3245f799f5c542b353b61b94292d6ad9"><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 class="definition">Definition at line <a class="el" href="WSClient_8h_source.html#l00033">33</a> of file <a class="el" href="WSClient_8h_source.html">WSClient.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a18715d15a0c71b3f9dd79bc728bf9a91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18715d15a0c71b3f9dd79bc728bf9a91">&#9670;&nbsp;</a></span>getMsg()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional</a>&lt;<a class="el" href="classJson_1_1Value.html">Json::Value</a>&gt; ripple::test::WSClient::getMsg </td>
<td>(</td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a> const &amp;&#160;</td>
<td class="paramname"><em>timeout</em> = <code><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a>{&#160;0}</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve a message. </p>
<p>Implemented in <a class="el" href="classripple_1_1test_1_1WSClientImpl.html#a86a8a8048d31ff5240185afeaa67690a">ripple::test::WSClientImpl</a>.</p>
</div>
</div>
<a id="ac6bc924603b7952aceae79db489572ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6bc924603b7952aceae79db489572ce">&#9670;&nbsp;</a></span>findMsg()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional</a>&lt;<a class="el" href="classJson_1_1Value.html">Json::Value</a>&gt; ripple::test::WSClient::findMsg </td>
<td>(</td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::milliseconds</a> const &amp;&#160;</td>
<td class="paramname"><em>timeout</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="el" href="classJson_1_1Value.html">Json::Value</a> const &amp;)&gt;&#160;</td>
<td class="paramname"><em>pred</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">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve a message that meets the predicate criteria. </p>
<p>Implemented in <a class="el" href="classripple_1_1test_1_1WSClientImpl.html#a566cb1b4a0df529c55065298cd8158ff">ripple::test::WSClientImpl</a>.</p>
</div>
</div>
<a id="a48e55a0ee80a76c782d40f1d055f0d55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48e55a0ee80a76c782d40f1d055f0d55">&#9670;&nbsp;</a></span>invoke()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classJson_1_1Value.html">Json::Value</a> ripple::test::AbstractClient::invoke </td>
<td>(</td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> const &amp;&#160;</td>
<td class="paramname"><em>cmd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classJson_1_1Value.html">Json::Value</a> const &amp;&#160;</td>
<td class="paramname"><em>params</em> = <code>{}</code>&#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">pure virtual</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Submit a command synchronously. </p>
<p>The arguments to the function and the returned JSON are in a normalized format, the same whether the client is using the JSON-RPC over HTTP/S or WebSocket transport.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cmd</td><td>The command to execute </td></tr>
<tr><td class="paramname">params</td><td><a class="el" href="classJson_1_1Value.html" title="Represents a JSON value.">Json::Value</a> of null or object type with zero or more key/value pairs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The server response in normalized format. </dd></dl>
<p>Implemented in <a class="el" href="classripple_1_1test_1_1WSClientImpl.html#a502eba2d2669de03da03191219c568d3">ripple::test::WSClientImpl</a>, and <a class="el" href="classripple_1_1test_1_1JSONRPCClient.html#a9875ee0122004b7a8592fa9c42c2f054">ripple::test::JSONRPCClient</a>.</p>
</div>
</div>
<a id="a3245f799f5c542b353b61b94292d6ad9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3245f799f5c542b353b61b94292d6ad9">&#9670;&nbsp;</a></span>version()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual unsigned ripple::test::AbstractClient::version </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">pure virtual</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get <a class="el" href="namespaceripple_1_1RPC.html">RPC</a> 1.0 or <a class="el" href="namespaceripple_1_1RPC.html">RPC</a> 2.0. </p>
<p>Implemented in <a class="el" href="classripple_1_1test_1_1WSClientImpl.html#a1226fae22971f69cc03846503f84232f">ripple::test::WSClientImpl</a>, and <a class="el" href="classripple_1_1test_1_1JSONRPCClient.html#a3e9907c3c05d837110db13178304824f">ripple::test::JSONRPCClient</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>