CppWAMP
C++11 client library for the WAMP protocol
|
Represents a pub/sub event subscription. More...
#include <cppwamp/subscription.hpp>
Public Member Functions | |
Subscription () | |
Constructs an empty subscription. More... | |
Subscription (const Subscription &other) | |
Copy constructor. | |
Subscription (Subscription &&other) noexcept | |
Move constructor. More... | |
operator bool () const | |
Returns false if the subscription is empty. | |
SubscriptionId | id () const |
Obtains the ID number of this subscription. | |
Subscription & | operator= (const Subscription &other) |
Copy assignment. | |
Subscription & | operator= (Subscription &&other) noexcept |
Move assignment. More... | |
void | unsubscribe () const |
Unsubscribes from the topic. | |
Represents a pub/sub event subscription.
A Subscription is a lightweight object returned by the subscribe
member functions of the Session family of classes. This objects allows users to unsubscribe the subscription.
It is always safe to unsubscribe via a Subscription object. If the Session or the subscription no longer exists, an unsubscribe operation effectively does nothing.
wamp::Subscription::Subscription | ( | ) |
Constructs an empty subscription.
!!(*this) == false
|
noexcept |
Move constructor.
!other == true
|
noexcept |
Move assignment.
!other == true