Logo ROOT   6.18/05
Reference Guide
List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
THttpWSEngine Class Referenceabstract

Definition at line 26 of file THttpWSEngine.h.

Public Member Functions

virtual ~THttpWSEngine ()=default
 
virtual void ClearHandle (Bool_t)=0
 
virtual UInt_t GetId () const =0
 
virtual void PostProcess (std::shared_ptr< THttpCallArg > &arg)
 Method invoked after user process data received via websocket. More...
 
virtual Bool_t PreProcess (std::shared_ptr< THttpCallArg > &arg)
 Method should be invoked before processing data coming from websocket If method returns kTRUE, data is processed internally and not dedicated for further usage. More...
 
virtual void Send (const void *buf, int len)=0
 
virtual void SendCharStar (const char *str)
 Envelope for sending string via the websocket. More...
 
virtual void SendHeader (const char *hdr, const void *buf, int len)=0
 

Protected Member Functions

 THttpWSEngine ()=default
 
virtual Bool_t CanSendDirectly ()
 One always can send data to websocket - as long as previous send operation completed. More...
 
virtual Bool_t SupportSendThrd () const
 Indicate if engine require extra thread to complete postponed thread operation. More...
 

Private Types

enum  { kNone , kData , kHeader , kText }
 

Private Attributes

std::condition_variable fCond
 ! condition used to sync with sending thread More...
 
std::string fData
 ! data (binary or text) More...
 
std::mutex fDataMutex
 ! protects data submitted for send operation More...
 
bool fDisabled {false}
 ! true shortly before cleanup, set under locked fMutex from WSHandler More...
 
bool fDoingSend {false}
 ! doing send operation in other thread More...
 
bool fHasSendThrd {false}
 ! if thread was started one have to call join method for it More...
 
std::string fHdr
 ! header More...
 
bool fMTSend {false}
 ! true when send operation runs, set under locked fMutex from WSHandler More...
 
std::thread fSendThrd
 ! dedicated thread for all send operations More...
 
enum THttpWSEngine:: { ... }  kNone
 ! kind of operation More...
 

Friends

class THttpWSHandler
 

#include </home/sftnight/build/workspace/root-makedoc-v618/rootspi/rdoc/src/v6-18-00-patches/net/http/src/THttpWSEngine.h>

Inheritance diagram for THttpWSEngine:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kNone 
kData 
kHeader 
kText 

Definition at line 39 of file THttpWSEngine.h.

Constructor & Destructor Documentation

◆ THttpWSEngine()

THttpWSEngine::THttpWSEngine ( )
protecteddefault

◆ ~THttpWSEngine()

virtual THttpWSEngine::~THttpWSEngine ( )
virtualdefault

Member Function Documentation

◆ CanSendDirectly()

virtual Bool_t THttpWSEngine::CanSendDirectly ( )
inlineprotectedvirtual

One always can send data to websocket - as long as previous send operation completed.

Reimplemented in THttpLongPollEngine.

Definition at line 51 of file THttpWSEngine.h.

◆ ClearHandle()

virtual void THttpWSEngine::ClearHandle ( Bool_t  )
pure virtual

Implemented in THttpLongPollEngine.

◆ GetId()

virtual UInt_t THttpWSEngine::GetId ( ) const
pure virtual

Implemented in THttpLongPollEngine.

◆ PostProcess()

void THttpWSEngine::PostProcess ( std::shared_ptr< THttpCallArg > &  arg)
virtual

Method invoked after user process data received via websocket.

Reimplemented in THttpLongPollEngine.

Definition at line 48 of file THttpWSEngine.cxx.

◆ PreProcess()

Bool_t THttpWSEngine::PreProcess ( std::shared_ptr< THttpCallArg > &  arg)
virtual

Method should be invoked before processing data coming from websocket If method returns kTRUE, data is processed internally and not dedicated for further usage.

Reimplemented in THttpLongPollEngine.

Definition at line 40 of file THttpWSEngine.cxx.

◆ Send()

virtual void THttpWSEngine::Send ( const void buf,
int  len 
)
pure virtual

Implemented in THttpLongPollEngine.

◆ SendCharStar()

void THttpWSEngine::SendCharStar ( const char *  str)
virtual

Envelope for sending string via the websocket.

Reimplemented in THttpLongPollEngine.

Definition at line 29 of file THttpWSEngine.cxx.

◆ SendHeader()

virtual void THttpWSEngine::SendHeader ( const char *  hdr,
const void buf,
int  len 
)
pure virtual

Implemented in THttpLongPollEngine.

◆ SupportSendThrd()

virtual Bool_t THttpWSEngine::SupportSendThrd ( ) const
inlineprotectedvirtual

Indicate if engine require extra thread to complete postponed thread operation.

Definition at line 48 of file THttpWSEngine.h.

Friends And Related Function Documentation

◆ THttpWSHandler

friend class THttpWSHandler
friend

Definition at line 29 of file THttpWSEngine.h.

Member Data Documentation

◆ fCond

std::condition_variable THttpWSEngine::fCond
private

! condition used to sync with sending thread

Definition at line 36 of file THttpWSEngine.h.

◆ fData

std::string THttpWSEngine::fData
private

! data (binary or text)

Definition at line 41 of file THttpWSEngine.h.

◆ fDataMutex

std::mutex THttpWSEngine::fDataMutex
private

! protects data submitted for send operation

Definition at line 38 of file THttpWSEngine.h.

◆ fDisabled

bool THttpWSEngine::fDisabled {false}
private

! true shortly before cleanup, set under locked fMutex from WSHandler

Definition at line 32 of file THttpWSEngine.h.

◆ fDoingSend

bool THttpWSEngine::fDoingSend {false}
private

! doing send operation in other thread

Definition at line 40 of file THttpWSEngine.h.

◆ fHasSendThrd

bool THttpWSEngine::fHasSendThrd {false}
private

! if thread was started one have to call join method for it

Definition at line 35 of file THttpWSEngine.h.

◆ fHdr

std::string THttpWSEngine::fHdr
private

! header

Definition at line 42 of file THttpWSEngine.h.

◆ fMTSend

bool THttpWSEngine::fMTSend {false}
private

! true when send operation runs, set under locked fMutex from WSHandler

Definition at line 31 of file THttpWSEngine.h.

◆ fSendThrd

std::thread THttpWSEngine::fSendThrd
private

! dedicated thread for all send operations

Definition at line 34 of file THttpWSEngine.h.

◆ 

enum { ... } THttpWSEngine::kNone

! kind of operation


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