rippled
Loading...
Searching...
No Matches
WSClient.h
1#ifndef XRPL_TEST_WSCLIENT_H_INCLUDED
2#define XRPL_TEST_WSCLIENT_H_INCLUDED
3
4#include <test/jtx/AbstractClient.h>
5
6#include <xrpld/core/Config.h>
7
8#include <chrono>
9#include <memory>
10#include <optional>
11
12namespace ripple {
13namespace test {
14
16{
17public:
22 0}) = 0;
23
27 std::chrono::milliseconds const& timeout,
28 std::function<bool(Json::Value const&)> pred) = 0;
29};
30
34 Config const& cfg,
35 bool v2 = true,
36 unsigned rpc_version = 2,
38
39} // namespace test
40} // namespace ripple
41
42#endif
Represents a JSON value.
Definition json_value.h:130
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.
std::unique_ptr< WSClient > makeWSClient(Config const &cfg, bool v2, unsigned rpc_version, std::unordered_map< std::string, std::string > const &headers)
Returns a client operating through WebSockets/S.
Definition WSClient.cpp:304
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6