rippled
|
Classes | |
struct | msg |
Public Member Functions | |
WSClientImpl (Config const &cfg, bool v2, unsigned rpc_version, std::unordered_map< std::string, std::string > const &headers={}) | |
~WSClientImpl () override | |
Json::Value | invoke (std::string const &cmd, Json::Value const ¶ms) override |
Submit a command synchronously. More... | |
std::optional< Json::Value > | getMsg (std::chrono::milliseconds const &timeout) override |
Retrieve a message. More... | |
std::optional< Json::Value > | findMsg (std::chrono::milliseconds const &timeout, std::function< bool(Json::Value const &)> pred) override |
Retrieve a message that meets the predicate criteria. More... | |
unsigned | version () const override |
Get RPC 1.0 or RPC 2.0. More... | |
Private Types | |
using | error_code = boost::system::error_code |
Private Member Functions | |
void | cleanup () |
void | on_read_msg (error_code const &ec) |
void | on_read_done () |
Static Private Member Functions | |
static boost::asio::ip::tcp::endpoint | getEndpoint (BasicConfig const &cfg, bool v2) |
template<class ConstBuffers > | |
static std::string | buffer_string (ConstBuffers const &b) |
Private Attributes | |
boost::asio::io_service | ios_ |
std::optional< boost::asio::io_service::work > | work_ |
boost::asio::io_service::strand | strand_ |
std::thread | thread_ |
boost::asio::ip::tcp::socket | stream_ |
boost::beast::websocket::stream< boost::asio::ip::tcp::socket & > | ws_ |
boost::beast::multi_buffer | rb_ |
bool | peerClosed_ = false |
bool | b0_ = false |
std::mutex | m0_ |
std::condition_variable | cv0_ |
std::mutex | m_ |
std::condition_variable | cv_ |
std::list< std::shared_ptr< msg > > | msgs_ |
unsigned | rpc_version_ |
Definition at line 40 of file WSClient.cpp.
|
private |
Definition at line 42 of file WSClient.cpp.
ripple::test::WSClientImpl::WSClientImpl | ( | Config const & | cfg, |
bool | v2, | ||
unsigned | rpc_version, | ||
std::unordered_map< std::string, std::string > const & | headers = {} |
||
) |
Definition at line 128 of file WSClient.cpp.
|
override |
Definition at line 164 of file WSClient.cpp.
|
staticprivate |
Definition at line 54 of file WSClient.cpp.
|
staticprivate |
Definition at line 80 of file WSClient.cpp.
|
private |
Definition at line 113 of file WSClient.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 ripple::test::AbstractClient.
Definition at line 170 of file WSClient.cpp.
|
overridevirtual |
|
overridevirtual |
Retrieve a message that meets the predicate criteria.
Implements ripple::test::WSClient.
Definition at line 230 of file WSClient.cpp.
|
overridevirtual |
Implements ripple::test::AbstractClient.
Definition at line 257 of file WSClient.cpp.
|
private |
Definition at line 264 of file WSClient.cpp.
|
private |
Definition at line 291 of file WSClient.cpp.
|
private |
Definition at line 90 of file WSClient.cpp.
|
private |
Definition at line 91 of file WSClient.cpp.
|
private |
Definition at line 92 of file WSClient.cpp.
|
private |
Definition at line 93 of file WSClient.cpp.
|
private |
Definition at line 94 of file WSClient.cpp.
|
private |
Definition at line 95 of file WSClient.cpp.
|
private |
Definition at line 96 of file WSClient.cpp.
|
private |
Definition at line 98 of file WSClient.cpp.
|
private |
Definition at line 101 of file WSClient.cpp.
|
private |
Definition at line 102 of file WSClient.cpp.
|
private |
Definition at line 103 of file WSClient.cpp.
|
private |
Definition at line 106 of file WSClient.cpp.
|
private |
Definition at line 107 of file WSClient.cpp.
|
private |
Definition at line 108 of file WSClient.cpp.
|
private |
Definition at line 110 of file WSClient.cpp.