xrpld
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 <xrpl/json/json_value.h>
8
9#include <chrono>
10#include <functional>
11#include <memory>
12#include <optional>
13#include <string>
14#include <unordered_map>
15
16namespace xrpl::test {
17
19{
20public:
26
32 std::chrono::milliseconds const& timeout,
33 std::function<bool(json::Value const&)> pred) = 0;
34};
35
41 Config const& cfg,
42 bool v2 = true,
43 unsigned rpcVersion = 2,
45
46} // namespace xrpl::test
Represents a JSON value.
Definition json_value.h:117
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 std::optional< json::Value > getMsg(std::chrono::milliseconds const &timeout=std::chrono::milliseconds{0})=0
Retrieve a message.
std::unique_ptr< WSClient > makeWSClient(Config const &cfg, bool v2, unsigned rpcVersion, std::unordered_map< std::string, std::string > const &headers)
Returns a client operating through WebSockets/S.
Definition WSClient.cpp:371