|
xrpld
|


Public Member Functions | |
| JSONRPCClient (Config const &cfg, unsigned rpcVersion) | |
| json::Value | invoke (std::string const &cmd, json::Value const ¶ms) override |
| Submit a command synchronously. | |
| unsigned | version () const override |
| Get RPC 1.0 or RPC 2.0. | |
| void | disconnect () override |
| Close the client's connection to the server. | |
Private Member Functions | |
| void | reconnect () |
Static Private Member Functions | |
| static boost::asio::ip::tcp::endpoint | getEndpoint (BasicConfig const &cfg) |
| template<class ConstBufferSequence> | |
| static std::string | bufferString (ConstBufferSequence const &b) |
| static bool | droppedConnection (boost::system::error_code const &ec) |
Private Attributes | |
| boost::asio::ip::tcp::endpoint | ep_ |
| boost::asio::io_context | ios_ |
| boost::asio::ip::tcp::socket | stream_ |
| boost::beast::multi_buffer | bin_ |
| boost::beast::multi_buffer | bout_ |
| unsigned | rpcVersion_ |
| bool | disconnected_ = false |
Definition at line 42 of file JSONRPCClient.cpp.
|
explicit |
Definition at line 127 of file JSONRPCClient.cpp.
|
staticprivate |
Definition at line 45 of file JSONRPCClient.cpp.
|
staticprivate |
Definition at line 76 of file JSONRPCClient.cpp.
|
staticprivate |
Definition at line 98 of file JSONRPCClient.cpp.
|
private |
Definition at line 118 of file JSONRPCClient.cpp.
|
overridevirtual |
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.
| cmd | The command to execute |
| params | json::Value of null or object type with zero or more key/value pairs. |
Implements xrpl::test::AbstractClient.
Definition at line 138 of file JSONRPCClient.cpp.
|
nodiscardoverridevirtual |
Get RPC 1.0 or RPC 2.0.
Implements xrpl::test::AbstractClient.
Definition at line 213 of file JSONRPCClient.cpp.
|
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.
|
private |
Definition at line 85 of file JSONRPCClient.cpp.
|
private |
Definition at line 86 of file JSONRPCClient.cpp.
|
private |
Definition at line 87 of file JSONRPCClient.cpp.
|
private |
Definition at line 88 of file JSONRPCClient.cpp.
|
private |
Definition at line 89 of file JSONRPCClient.cpp.
|
private |
Definition at line 90 of file JSONRPCClient.cpp.
|
private |
Definition at line 92 of file JSONRPCClient.cpp.