rippled
Loading...
Searching...
No Matches
RPCSub.h
1#pragma once
2
3#include <xrpl/core/JobQueue.h>
4#include <xrpl/core/ServiceRegistry.h>
5#include <xrpl/server/InfoSub.h>
6
7#include <boost/asio/io_context.hpp>
8
9namespace xrpl {
10
12class RPCSub : public InfoSub
13{
14public:
15 virtual void
16 setUsername(std::string const& strUsername) = 0;
17 virtual void
18 setPassword(std::string const& strPassword) = 0;
19
20protected:
21 explicit RPCSub(InfoSub::Source& source);
22};
23
24// VFALCO Why is the io_context needed?
27 InfoSub::Source& source,
28 boost::asio::io_context& io_context,
29 JobQueue& jobQueue,
30 std::string const& strUrl,
31 std::string const& strUsername,
32 std::string const& strPassword,
33 ServiceRegistry& registry);
34
35} // namespace xrpl
Abstracts the source of subscription data.
Definition InfoSub.h:47
Manages a client's subscription to data feeds.
Definition InfoSub.h:31
A pool of threads to perform work.
Definition JobQueue.h:38
Subscription object for JSON RPC.
Definition RPCSub.h:13
virtual void setUsername(std::string const &strUsername)=0
virtual void setPassword(std::string const &strPassword)=0
Service registry for dependency injection.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::shared_ptr< RPCSub > make_RPCSub(InfoSub::Source &source, boost::asio::io_context &io_context, JobQueue &jobQueue, std::string const &strUrl, std::string const &strUsername, std::string const &strPassword, ServiceRegistry &registry)
Definition RPCSub.cpp:195