Logo ROOT   6.14/05
Reference Guide
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
THttpLongPollEngine Class Reference

Definition at line 22 of file THttpLongPollEngine.h.

Classes

struct  QueueItem
 

Public Member Functions

 THttpLongPollEngine (bool raw=false)
 constructor More...
 
virtual void ClearHandle ()
 clear request, waiting for next portion of data More...
 
virtual UInt_t GetId () const
 returns ID of the engine, created from this pointer More...
 
virtual void PostProcess (std::shared_ptr< THttpCallArg > &arg)
 Normally requests from client does not replied directly for longpoll socket Therefore one can use such request to send data, which was submitted before to the queue. More...
 
virtual Bool_t PreviewData (std::shared_ptr< THttpCallArg > &arg)
 Preview data for given socket function called in the user code before processing correspondent websocket data returns kTRUE when user should ignore such http request - it is for internal use. More...
 
virtual void Send (const void *buf, int len)
 Send binary data via connection - not supported. More...
 
virtual void SendCharStar (const char *buf)
 Send const char data Either do it immediately or keep in internal buffer. More...
 
virtual void SendHeader (const char *hdr, const void *buf, int len)
 Send binary data with text header via connection - not supported. More...
 
- Public Member Functions inherited from THttpWSEngine
virtual ~THttpWSEngine ()
 

Protected Member Functions

std::string MakeBuffer (const void *buf, int len, const char *hdr=nullptr)
 !< default reply on the longpoll request More...
 
- Protected Member Functions inherited from THttpWSEngine
 THttpWSEngine ()=default
 

Protected Attributes

std::shared_ptr< THttpCallArgfPoll
 !< if true, only content can be used for data transfer More...
 
std::queue< QueueItemfQueue
 !< hold polling request, which can be immediately used for the next sending More...
 
bool fRaw {false}
 

Static Protected Attributes

static const std::string gLongPollNope = "<<nope>>"
 !< entries submitted to client More...
 

Friends

class THttpServer
 

#include </mnt/build/workspace/root-makedoc-v614/rootspi/rdoc/src/v6-14-00-patches/net/http/src/THttpLongPollEngine.h>

Inheritance diagram for THttpLongPollEngine:
[legend]

Constructor & Destructor Documentation

◆ THttpLongPollEngine()

THttpLongPollEngine::THttpLongPollEngine ( bool  raw = false)

constructor

Definition at line 35 of file THttpLongPollEngine.cxx.

Member Function Documentation

◆ ClearHandle()

void THttpLongPollEngine::ClearHandle ( )
virtual

clear request, waiting for next portion of data

Implements THttpWSEngine.

Definition at line 51 of file THttpLongPollEngine.cxx.

◆ GetId()

UInt_t THttpLongPollEngine::GetId ( ) const
virtual

returns ID of the engine, created from this pointer

Implements THttpWSEngine.

Definition at line 42 of file THttpLongPollEngine.cxx.

◆ MakeBuffer()

std::string THttpLongPollEngine::MakeBuffer ( const void buf,
int  len,
const char *  hdr = nullptr 
)
protected

!< default reply on the longpoll request

Create raw buffer which should be send as reply For the raw mode all information must be send via binary response.

Definition at line 64 of file THttpLongPollEngine.cxx.

◆ PostProcess()

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

Normally requests from client does not replied directly for longpoll socket Therefore one can use such request to send data, which was submitted before to the queue.

Reimplemented from THttpWSEngine.

Definition at line 199 of file THttpLongPollEngine.cxx.

◆ PreviewData()

Bool_t THttpLongPollEngine::PreviewData ( std::shared_ptr< THttpCallArg > &  arg)
virtual

Preview data for given socket function called in the user code before processing correspondent websocket data returns kTRUE when user should ignore such http request - it is for internal use.

Reimplemented from THttpWSEngine.

Definition at line 155 of file THttpLongPollEngine.cxx.

◆ Send()

void THttpLongPollEngine::Send ( const void buf,
int  len 
)
virtual

Send binary data via connection - not supported.

Implements THttpWSEngine.

Definition at line 94 of file THttpLongPollEngine.cxx.

◆ SendCharStar()

void THttpLongPollEngine::SendCharStar ( const char *  buf)
virtual

Send const char data Either do it immediately or keep in internal buffer.

Reimplemented from THttpWSEngine.

Definition at line 133 of file THttpLongPollEngine.cxx.

◆ SendHeader()

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

Send binary data with text header via connection - not supported.

Implements THttpWSEngine.

Definition at line 112 of file THttpLongPollEngine.cxx.

Friends And Related Function Documentation

◆ THttpServer

friend class THttpServer
friend

Definition at line 23 of file THttpLongPollEngine.h.

Member Data Documentation

◆ fPoll

std::shared_ptr<THttpCallArg> THttpLongPollEngine::fPoll
protected

!< if true, only content can be used for data transfer

Definition at line 34 of file THttpLongPollEngine.h.

◆ fQueue

std::queue<QueueItem> THttpLongPollEngine::fQueue
protected

!< hold polling request, which can be immediately used for the next sending

Definition at line 35 of file THttpLongPollEngine.h.

◆ fRaw

bool THttpLongPollEngine::fRaw {false}
protected

Definition at line 33 of file THttpLongPollEngine.h.

◆ gLongPollNope

const std::string THttpLongPollEngine::gLongPollNope = "<<nope>>"
staticprotected

!< entries submitted to client

Definition at line 36 of file THttpLongPollEngine.h.

Libraries for THttpLongPollEngine:
[legend]

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