Clio develop
The XRP Ledger API server.
|
A context of a WsBase connection for subscriptions. More...
#include <SubscriptionContext.hpp>
Public Member Functions | |
SubscriptionContext (util::TagDecoratorFactory const &factory, std::shared_ptr< ConnectionBase > connection) | |
Construct a new Subscription Context object. | |
~SubscriptionContext () override | |
Destroy the Subscription Context object. | |
void | send (std::shared_ptr< std::string > message) override |
Send message to the client. | |
void | onDisconnect (OnDisconnectSlot const &slot) override |
Connect a slot to onDisconnect connection signal. | |
void | setApiSubversion (uint32_t value) override |
Set the API subversion. | |
uint32_t | apiSubversion () const override |
Get the API subversion. | |
![]() | |
![]() | |
Taggable (Taggable &&)=default | |
Taggable & | operator= (Taggable &&)=default |
BaseTagDecorator const & | tag () const |
Getter for tag decorator. | |
Additional Inherited Members | |
![]() | |
using | OnDisconnectSlot = std::function<void(SubscriptionContextInterface*)> |
Alias for on disconnect slot. | |
![]() | |
Taggable (util::TagDecoratorFactory const &tagFactory) | |
New Taggable from a specified factory. | |
A context of a WsBase connection for subscriptions.
web::SubscriptionContext::SubscriptionContext | ( | util::TagDecoratorFactory const & | factory, |
std::shared_ptr< ConnectionBase > | connection ) |
Construct a new Subscription Context object.
factory | The tag decorator factory to use to init taggable. |
connection | The connection for which the context is created. |
|
overridevirtual |
|
overridevirtual |
Connect a slot to onDisconnect connection signal.
slot | The slot to connect. |
Implements web::SubscriptionContextInterface.
|
overridevirtual |
Send message to the client.
message | The message to send. |
Implements web::SubscriptionContextInterface.
|
overridevirtual |
Set the API subversion.
value | The value to set. |
Implements web::SubscriptionContextInterface.