Logo ROOT  
Reference Guide
TCivetwebWSEngine Class Reference

TCivetwebWSEngine.

Implementation of THttpWSEngine for Civetweb

Definition at line 30 of file TCivetweb.cxx.

Public Member Functions

 TCivetwebWSEngine (struct mg_connection *conn)
 
virtual ~TCivetwebWSEngine ()=default
 
void ClearHandle (Bool_t terminate) override
 
UInt_t GetId () const override
 
void Send (const void *buf, int len) override
 
void SendCharStar (const char *str) override
 Envelope for sending string via the websocket. More...
 
void SendHeader (const char *hdr, const void *buf, int len) override
 Special method to send binary data with text header For normal websocket it is two separated operation, for other engines could be combined together, but emulates as two messages on client side. More...
 
- Public Member Functions inherited from THttpWSEngine
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

Bool_t SupportSendThrd () const override
 True websocket requires extra thread to parallelize sending. More...
 
- Protected Member Functions inherited from THttpWSEngine
 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...
 

Protected Attributes

struct mg_connectionfWSconn
 
Inheritance diagram for TCivetwebWSEngine:
[legend]

Constructor & Destructor Documentation

◆ TCivetwebWSEngine()

TCivetwebWSEngine::TCivetwebWSEngine ( struct mg_connection conn)
inline

Definition at line 38 of file TCivetweb.cxx.

◆ ~TCivetwebWSEngine()

virtual TCivetwebWSEngine::~TCivetwebWSEngine ( )
virtualdefault

Member Function Documentation

◆ ClearHandle()

void TCivetwebWSEngine::ClearHandle ( Bool_t  terminate)
inlineoverridevirtual

Implements THttpWSEngine.

Definition at line 44 of file TCivetweb.cxx.

◆ GetId()

UInt_t TCivetwebWSEngine::GetId ( ) const
inlineoverridevirtual

Implements THttpWSEngine.

Definition at line 42 of file TCivetweb.cxx.

◆ Send()

void TCivetwebWSEngine::Send ( const void *  buf,
int  len 
)
inlineoverridevirtual

Implements THttpWSEngine.

Definition at line 51 of file TCivetweb.cxx.

◆ SendCharStar()

void TCivetwebWSEngine::SendCharStar ( const char *  str)
inlineoverridevirtual

Envelope for sending string via the websocket.

Reimplemented from THttpWSEngine.

Definition at line 69 of file TCivetweb.cxx.

◆ SendHeader()

void TCivetwebWSEngine::SendHeader ( const char *  hdr,
const void *  buf,
int  len 
)
inlineoverridevirtual

Special method to send binary data with text header For normal websocket it is two separated operation, for other engines could be combined together, but emulates as two messages on client side.

Implements THttpWSEngine.

Definition at line 61 of file TCivetweb.cxx.

◆ SupportSendThrd()

Bool_t TCivetwebWSEngine::SupportSendThrd ( ) const
inlineoverrideprotectedvirtual

True websocket requires extra thread to parallelize sending.

Reimplemented from THttpWSEngine.

Definition at line 35 of file TCivetweb.cxx.

Member Data Documentation

◆ fWSconn

struct mg_connection* TCivetwebWSEngine::fWSconn
protected

Definition at line 32 of file TCivetweb.cxx.


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