Chatterino
|
#include <BasicPubSubClient.hpp>
Public Member Functions | |
BasicPubSubClient (liveupdates::WebsocketClient &websocketClient, liveupdates::WebsocketHandle handle, size_t maxSubscriptions=100) | |
virtual | ~BasicPubSubClient ()=default |
BasicPubSubClient (const BasicPubSubClient &)=delete | |
BasicPubSubClient (const BasicPubSubClient &&)=delete | |
BasicPubSubClient & | operator= (const BasicPubSubClient &)=delete |
BasicPubSubClient & | operator= (const BasicPubSubClient &&)=delete |
Public Attributes | |
const size_t | maxSubscriptions |
Protected Member Functions | |
virtual void | onConnectionEstablished () |
bool | send (const char *payload) |
bool | subscribe (const Subscription &subscription) |
bool | unsubscribe (const Subscription &subscription) |
void | close (const std::string &reason, websocketpp::close::status::value code=websocketpp::close::status::normal) |
bool | isStarted () const |
Protected Attributes | |
liveupdates::WebsocketClient & | websocketClient_ |
Friends | |
template<typename ManagerSubscription > | |
class | BasicPubSubManager |
This class manages a single connection that has at most maxSubscriptions subscriptions.
You can safely overload the onConnectionEstablished method and e.g. add additional heartbeat logic.
You can use shared_from_this to get a shared_ptr of this client.
Subscription | see BasicPubSubManager |
|
inline |
|
virtualdefault |
|
delete |
|
delete |
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
Reimplemented in chatterino::SeventvEventAPIClient.
|
delete |
|
delete |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
friend |
const size_t chatterino::BasicPubSubClient< Subscription >::maxSubscriptions |
|
protected |