Twitch SDK (Internal)
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
ttv::chat::ChatMessagePacer Class Reference

#include <chathelpers.h>

Public Member Functions

 ChatMessagePacer ()
 
bool TrackMessage ()
 
void Clear ()
 

Private Attributes

std::array< uint64_t, kMessagePacingWindowSizemMessageSubmissionTimes
 The ring buffer of timestamps for the last n messages submitted. This is used for preventing the client from submitting too many too quickly and becoming blacklisted. More...
 
uint mNextMessageSubmissionIndex
 The index of the next entry to write in mMessageSubmissionTimes. More...
 

Static Private Attributes

static const uint kMessagePacingWindowSize = 18
 
static const uint kMessagePacingTimeSpanSeconds = 30
 

Constructor & Destructor Documentation

◆ ChatMessagePacer()

ttv::chat::ChatMessagePacer::ChatMessagePacer ( )

Member Function Documentation

◆ Clear()

void ttv::chat::ChatMessagePacer::Clear ( )

◆ TrackMessage()

bool ttv::chat::ChatMessagePacer::TrackMessage ( )

Member Data Documentation

◆ kMessagePacingTimeSpanSeconds

const uint ttv::chat::ChatMessagePacer::kMessagePacingTimeSpanSeconds = 30
staticprivate

◆ kMessagePacingWindowSize

const uint ttv::chat::ChatMessagePacer::kMessagePacingWindowSize = 18
staticprivate

◆ mMessageSubmissionTimes

std::array<uint64_t, kMessagePacingWindowSize> ttv::chat::ChatMessagePacer::mMessageSubmissionTimes
private

The ring buffer of timestamps for the last n messages submitted. This is used for preventing the client from submitting too many too quickly and becoming blacklisted.

◆ mNextMessageSubmissionIndex

uint ttv::chat::ChatMessagePacer::mNextMessageSubmissionIndex
private

The index of the next entry to write in mMessageSubmissionTimes.


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