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 <chrono>
8#include <memory>
9#include <optional>
10
11namespace xrpl::test {
12
14{
15public:
19
23 std::chrono::milliseconds const& timeout,
24 std::function<bool(json::Value const&)> pred) = 0;
25};
26
30 Config const& cfg,
31 bool v2 = true,
32 unsigned rpcVersion = 2,
34
35} // namespace xrpl::test
Represents a JSON value.
Definition json_value.h:130
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:329