Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCivetwebWSEngine Class Reference

TCivetwebWSEngine.

Implementation of THttpWSEngine for Civetweb

Definition at line 32 of file TCivetweb.cxx.

Public Member Functions

 TCivetwebWSEngine (struct mg_connection *conn)
 
 ~TCivetwebWSEngine () override=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.
 
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.
 
- Public Member Functions inherited from THttpWSEngine
virtual ~THttpWSEngine ()=default
 
virtual void PostProcess (std::shared_ptr< THttpCallArg > &arg)
 Method invoked after user process data received via websocket.
 
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.
 

Protected Member Functions

Bool_t SupportSendThrd () const override
 True websocket requires extra thread to parallelize sending.
 
- 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.
 

Protected Attributes

struct mg_connectionfWSconn
 
Inheritance diagram for TCivetwebWSEngine:
[legend]

Constructor & Destructor Documentation

◆ TCivetwebWSEngine()

TCivetwebWSEngine::TCivetwebWSEngine ( struct mg_connection conn)
inline

Definition at line 40 of file TCivetweb.cxx.

◆ ~TCivetwebWSEngine()

TCivetwebWSEngine::~TCivetwebWSEngine ( )
overridedefault

Member Function Documentation

◆ ClearHandle()

void TCivetwebWSEngine::ClearHandle ( Bool_t  terminate)
inlineoverridevirtual

Implements THttpWSEngine.

Definition at line 46 of file TCivetweb.cxx.

◆ GetId()

UInt_t TCivetwebWSEngine::GetId ( ) const
inlineoverridevirtual

Implements THttpWSEngine.

Definition at line 44 of file TCivetweb.cxx.

◆ Send()

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

Implements THttpWSEngine.

Definition at line 53 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 71 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 63 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 37 of file TCivetweb.cxx.

Member Data Documentation

◆ fWSconn

struct mg_connection* TCivetwebWSEngine::fWSconn
protected

Definition at line 34 of file TCivetweb.cxx.

  • net/http/src/TCivetweb.cxx