Definition at line 42 of file JSONRPCClient.cpp.
◆ JSONRPCClient()
| xrpl::test::JSONRPCClient::JSONRPCClient |
( |
Config const & | cfg, |
|
|
unsigned | rpcVersion ) |
|
explicit |
◆ getEndpoint()
| boost::asio::ip::tcp::endpoint xrpl::test::JSONRPCClient::getEndpoint |
( |
BasicConfig const & | cfg | ) |
|
|
staticprivate |
◆ bufferString()
template<class ConstBufferSequence>
| std::string xrpl::test::JSONRPCClient::bufferString |
( |
ConstBufferSequence const & | b | ) |
|
|
staticprivate |
◆ droppedConnection()
| bool xrpl::test::JSONRPCClient::droppedConnection |
( |
boost::system::error_code const & | ec | ) |
|
|
staticprivate |
◆ reconnect()
| void xrpl::test::JSONRPCClient::reconnect |
( |
| ) |
|
|
private |
◆ invoke()
Submit a command synchronously.
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.
- Parameters
-
| cmd | The command to execute |
| params | json::Value of null or object type with zero or more key/value pairs. |
- Returns
- The server response in normalized format.
Implements xrpl::test::AbstractClient.
Definition at line 138 of file JSONRPCClient.cpp.
◆ version()
| unsigned xrpl::test::JSONRPCClient::version |
( |
| ) |
const |
|
nodiscardoverridevirtual |
◆ disconnect()
| void xrpl::test::JSONRPCClient::disconnect |
( |
| ) |
|
|
overridevirtual |
Close the client's connection to the server.
Releases the connection the client holds against the server's per-port connection limit. After this call the client must not be used to invoke() again. Tests use this to deterministically free the slot rather than waiting for the server's idle timeout to drop it.
Implements xrpl::test::AbstractClient.
Definition at line 219 of file JSONRPCClient.cpp.
◆ ep_
| boost::asio::ip::tcp::endpoint xrpl::test::JSONRPCClient::ep_ |
|
private |
◆ ios_
| boost::asio::io_context xrpl::test::JSONRPCClient::ios_ |
|
private |
◆ stream_
| boost::asio::ip::tcp::socket xrpl::test::JSONRPCClient::stream_ |
|
private |
◆ bin_
| boost::beast::multi_buffer xrpl::test::JSONRPCClient::bin_ |
|
private |
◆ bout_
| boost::beast::multi_buffer xrpl::test::JSONRPCClient::bout_ |
|
private |
◆ rpcVersion_
| unsigned xrpl::test::JSONRPCClient::rpcVersion_ |
|
private |
◆ disconnected_
| bool xrpl::test::JSONRPCClient::disconnected_ = false |
|
private |