1#ifndef XRPL_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
2#define XRPL_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
4#include <xrpld/rpc/InfoSub.h>
6#include <xrpl/protocol/MultiApiJson.h>
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.