Twitch SDK (Internal)
Public Member Functions | Static Public Attributes | List of all members
ttv::chat::IChatTransport Class Referenceabstract

#include <ichattransport.h>

Inheritance diagram for ttv::chat::IChatTransport:
ttv::chat::ChatSocketTransport

Public Member Functions

virtual ~IChatTransport ()
 
virtual TTV_ErrorCode Connect (const std::string &uri)=0
 
virtual TTV_ErrorCode Close ()=0
 
virtual bool IsOpen ()=0
 
virtual void SetReader (std::shared_ptr< IChatTransportReader > reader)=0
 
virtual TTV_ErrorCode Write (const char *pData, size_t nSize)=0
 
virtual TTV_ErrorCode ProcessIncomingEvent (bool &handled)=0
 

Static Public Attributes

static const uint32_t kMaxIrcTextLength = 2048
 The max number of bytes allowed in the text area of the message. More...
 
static const uint32_t kMaxIrcTagsLength = 4096
 The max number of bytes allowed in the IRCv3 tags area of the message. More...
 
static const uint32_t kMaxBufferSize = kMaxIrcTextLength + kMaxIrcTagsLength
 

Detailed Description

Interface implemented by components which send and receive data.

Constructor & Destructor Documentation

◆ ~IChatTransport()

virtual ttv::chat::IChatTransport::~IChatTransport ( )
virtual

Destructor.

Member Function Documentation

◆ Close()

virtual TTV_ErrorCode ttv::chat::IChatTransport::Close ( )
pure virtual

◆ Connect()

virtual TTV_ErrorCode ttv::chat::IChatTransport::Connect ( const std::string &  uri)
pure virtual

◆ IsOpen()

virtual bool ttv::chat::IChatTransport::IsOpen ( )
pure virtual

◆ ProcessIncomingEvent()

virtual TTV_ErrorCode ttv::chat::IChatTransport::ProcessIncomingEvent ( bool &  handled)
pure virtual

Reads a single incoming event. Does not block. This will make calls into the reader.

Parameters
handledWhether or not there was an event to handle.

Implemented in ttv::chat::ChatSocketTransport.

◆ SetReader()

virtual void ttv::chat::IChatTransport::SetReader ( std::shared_ptr< IChatTransportReader reader)
pure virtual

Sets the reader which will receive data from reads.

Implemented in ttv::chat::ChatSocketTransport.

◆ Write()

virtual TTV_ErrorCode ttv::chat::IChatTransport::Write ( const char *  pData,
size_t  nSize 
)
pure virtual

Writes the given data to the transport.

Implemented in ttv::chat::ChatSocketTransport.

Member Data Documentation

◆ kMaxBufferSize

const uint32_t ttv::chat::IChatTransport::kMaxBufferSize = kMaxIrcTextLength + kMaxIrcTagsLength
static

◆ kMaxIrcTagsLength

const uint32_t ttv::chat::IChatTransport::kMaxIrcTagsLength = 4096
static

The max number of bytes allowed in the IRCv3 tags area of the message.

◆ kMaxIrcTextLength

const uint32_t ttv::chat::IChatTransport::kMaxIrcTextLength = 2048
static

The max number of bytes allowed in the text area of the message.


The documentation for this class was generated from the following file: