rippled
Loading...
Searching...
No Matches
BookListeners.h
1#ifndef XRPL_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
2#define XRPL_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
3
4#include <xrpld/rpc/InfoSub.h>
5
6#include <xrpl/protocol/MultiApiJson.h>
7
8#include <memory>
9#include <mutex>
10
11namespace ripple {
12
15{
16public:
18
20 {
21 }
22
25 void
27
30 void
32
44 void
45 publish(MultiApiJson const& jvObj, hash_set<std::uint64_t>& havePublished);
46
47private:
49
51};
52
53} // namespace ripple
54
55#endif
Listen to public/subscribe messages from a book.
std::recursive_mutex mLock
hash_map< std::uint64_t, InfoSub::wptr > mListeners
void removeSubscriber(std::uint64_t sub)
Stop publishing to a subscriber.
void addSubscriber(InfoSub::ref sub)
Add a new subscription for this book.
void publish(MultiApiJson const &jvObj, hash_set< std::uint64_t > &havePublished)
Publish a transaction to subscribers.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6