rippled
Loading...
Searching...
No Matches
WSClient.h
1#pragma once
2
3#include <test/jtx/AbstractClient.h>
4
5#include <xrpld/core/Config.h>
6
7#include <chrono>
8#include <memory>
9#include <optional>
10
11namespace xrpl {
12namespace test {
13
15{
16public:
20
23 findMsg(std::chrono::milliseconds const& timeout, std::function<bool(Json::Value const&)> pred) = 0;
24};
25
29 Config const& cfg,
30 bool v2 = true,
31 unsigned rpc_version = 2,
33
34} // namespace test
35} // namespace xrpl
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:285
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5