|
rippled
|
Listen to public/subscribe messages from a book. More...

Public Types | |
| using | pointer = std::shared_ptr< BookListeners > |
Public Member Functions | |
| BookListeners () | |
| void | addSubscriber (InfoSub::ref sub) |
| Add a new subscription for this book. More... | |
| void | removeSubscriber (std::uint64_t sub) |
| Stop publishing to a subscriber. More... | |
| void | publish (Json::Value const &jvObj, hash_set< std::uint64_t > &havePublished) |
| Publish a transaction to subscribers. More... | |
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 30 of file BookListeners.h.
Definition at line 33 of file BookListeners.h.
| ripple::BookListeners::BookListeners | ( | ) |
Definition at line 35 of file BookListeners.h.
| void ripple::BookListeners::addSubscriber | ( | InfoSub::ref | sub | ) |
Add a new subscription for this book.
Definition at line 27 of file BookListeners.cpp.
| void ripple::BookListeners::removeSubscriber | ( | std::uint64_t | sub | ) |
Stop publishing to a subscriber.
Definition at line 34 of file BookListeners.cpp.
| void ripple::BookListeners::publish | ( | Json::Value 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 41 of file BookListeners.cpp.
|
private |
Definition at line 64 of file BookListeners.h.
|
private |
Definition at line 66 of file BookListeners.h.
1.8.17