|
xrpld
|
#include <WSClient.h>


Public Member Functions | |
| virtual std::optional< json::Value > | getMsg (std::chrono::milliseconds const &timeout=std::chrono::milliseconds{0})=0 |
| Retrieve a message. | |
| virtual std::optional< json::Value > | findMsg (std::chrono::milliseconds const &timeout, std::function< bool(json::Value const &)> pred)=0 |
| Retrieve a message that meets the predicate criteria. | |
| virtual json::Value | invoke (std::string const &cmd, json::Value const ¶ms={})=0 |
| Submit a command synchronously. | |
| virtual unsigned | version () const =0 |
| Get RPC 1.0 or RPC 2.0. | |
| virtual void | disconnect ()=0 |
| Close the client's connection to the server. | |
Definition at line 18 of file WSClient.h.
|
pure virtual |
Retrieve a message.
Implemented in xrpl::test::WSClientImpl.
|
pure virtual |
Retrieve a message that meets the predicate criteria.
Implemented in xrpl::test::WSClientImpl.
|
pure virtualinherited |
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. |
Implemented in xrpl::test::JSONRPCClient, and xrpl::test::WSClientImpl.
|
nodiscardpure virtualinherited |
Get RPC 1.0 or RPC 2.0.
Implemented in xrpl::test::JSONRPCClient, and xrpl::test::WSClientImpl.
|
pure virtualinherited |
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.
Implemented in xrpl::test::JSONRPCClient, and xrpl::test::WSClientImpl.