| 
    rippled
    
   | 
 
Listen to public/subscribe messages from a book. More...
#include <BookListeners.h>

Public Types | |
| using | pointer = std::shared_ptr< BookListeners > | 
Public Member Functions | |
| BookListeners () | |
| void | addSubscriber (InfoSub::ref sub) | 
| Add a new subscription for this book.   | |
| void | removeSubscriber (std::uint64_t sub) | 
| Stop publishing to a subscriber.   | |
| void | publish (MultiApiJson const &jvObj, hash_set< std::uint64_t > &havePublished) | 
| Publish a transaction to subscribers.   | |
Private Attributes | |
| std::recursive_mutex | mLock | 
| hash_map< std::uint64_t, InfoSub::wptr > | mListeners | 
Listen to public/subscribe messages from a book.
Definition at line 33 of file BookListeners.h.
Definition at line 36 of file BookListeners.h.
| ripple::BookListeners::BookListeners | ( | ) | 
Definition at line 38 of file BookListeners.h.
| void ripple::BookListeners::addSubscriber | ( | InfoSub::ref | sub | ) | 
Add a new subscription for this book.
Definition at line 25 of file BookListeners.cpp.
| void ripple::BookListeners::removeSubscriber | ( | std::uint64_t | sub | ) | 
Stop publishing to a subscriber.
Definition at line 32 of file BookListeners.cpp.
| void ripple::BookListeners::publish | ( | MultiApiJson const & | jvObj, | 
| hash_set< std::uint64_t > & | havePublished | ||
| ) | 
Publish a transaction to subscribers.
Publish a transaction to clients subscribed to changes on this book. Uses havePublished to prevent sending duplicate transactions to clients that have subscribed to multiple books.
| jvObj | JSON transaction data to publish | 
| havePublished | InfoSub sequence numbers that have already published this transaction. | 
Definition at line 39 of file BookListeners.cpp.
      
  | 
  private | 
Definition at line 67 of file BookListeners.h.
      
  | 
  private | 
Definition at line 69 of file BookListeners.h.