|
Twitch SDK (Internal)
|
#include <pubsubclientconnection.h>
Classes | |
| class | IListener |
| struct | OutstandingRequest |
| struct | TopicSubscriptionState |
Public Types | |
| typedef std::function< void(TTV_ErrorCode ec, const std::string &error, const json::Value &result)> | InternalCallback |
Public Member Functions | |
| PubSubClientConnection (std::shared_ptr< User > user) | |
| PubSubState | GetState () const |
| TopicSubscriptionState::Enum | GetTopicState (const std::string &topic) const |
| void | AddListener (const std::shared_ptr< IListener > &listener) |
| void | RemoveListener (const std::shared_ptr< IListener > &listener) |
| TTV_ErrorCode | Connect () |
| TTV_ErrorCode | Disconnect () |
| TTV_ErrorCode | Send (const std::string &text) |
| bool | Connected () |
| TTV_ErrorCode | Listen (const std::string &topic, std::shared_ptr< User > user) |
| TTV_ErrorCode | Unlisten (const std::string &topic) |
| TTV_ErrorCode | SendMessageOverSocket (const json::Value &root) |
| TTV_ErrorCode | SendNullDataMessage (const std::string &type) |
| TTV_ErrorCode | PollSocket () |
| void | Update () |
| uint32_t | GetConnectionIndex () const |
Private Member Functions | |
| TTV_ErrorCode | HandleIncomingMessage () |
| TTV_ErrorCode | InitiatePing () |
| void | SetConnectionState (PubSubState state, TTV_ErrorCode ec) |
| void | Log (TTV_MessageLevel level, const char *format,...) |
Private Attributes | |
| std::weak_ptr< User > | mUser |
| std::shared_ptr< IWebSocket > | mSocket |
| std::string | mReadBuffer |
| std::map< std::string, TopicSubscriptionState::Enum > | mTopicStates |
| std::map< std::string, OutstandingRequest > | mOutstandingRequests |
| json::Reader | mJsonReader |
| json::FastWriter | mJsonWriter |
| WaitForExpiry | mPingTimer |
| WaitForExpiry | mPongTimer |
| PubSubState | mState |
| EventSource< IListener > | mListeners |
| uint32_t | mConnectionIndex |
A single use connection used by PubSubClient. Once it has made a connection attempt it should not be used again once disconnected. This is a single threaded component.
| typedef std::function<void(TTV_ErrorCode ec, const std::string& error, const json::Value& result)> ttv::PubSubClientConnection::InternalCallback |
| ttv::PubSubClientConnection::PubSubClientConnection | ( | std::shared_ptr< User > | user | ) |
| void ttv::PubSubClientConnection::AddListener | ( | const std::shared_ptr< IListener > & | listener | ) |
| TTV_ErrorCode ttv::PubSubClientConnection::Connect | ( | ) |
| bool ttv::PubSubClientConnection::Connected | ( | ) |
| TTV_ErrorCode ttv::PubSubClientConnection::Disconnect | ( | ) |
|
inline |
|
inline |
| TopicSubscriptionState::Enum ttv::PubSubClientConnection::GetTopicState | ( | const std::string & | topic | ) | const |
|
private |
|
private |
| TTV_ErrorCode ttv::PubSubClientConnection::Listen | ( | const std::string & | topic, |
| std::shared_ptr< User > | user | ||
| ) |
|
private |
| TTV_ErrorCode ttv::PubSubClientConnection::PollSocket | ( | ) |
| void ttv::PubSubClientConnection::RemoveListener | ( | const std::shared_ptr< IListener > & | listener | ) |
| TTV_ErrorCode ttv::PubSubClientConnection::Send | ( | const std::string & | text | ) |
| TTV_ErrorCode ttv::PubSubClientConnection::SendMessageOverSocket | ( | const json::Value & | root | ) |
| TTV_ErrorCode ttv::PubSubClientConnection::SendNullDataMessage | ( | const std::string & | type | ) |
|
private |
| TTV_ErrorCode ttv::PubSubClientConnection::Unlisten | ( | const std::string & | topic | ) |
| void ttv::PubSubClientConnection::Update | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.13