Definition at line 23 of file THttpLongPollEngine.h.
Public Member Functions | |
THttpLongPollEngine (bool raw=false) | |
constructor | |
virtual | ~THttpLongPollEngine ()=default |
void | ClearHandle (Bool_t) override |
clear request, normally called shortly before destructor | |
UInt_t | GetId () const override |
returns ID of the engine, created from this pointer | |
void | PostProcess (std::shared_ptr< THttpCallArg > &arg) override |
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. | |
Bool_t | PreProcess (std::shared_ptr< THttpCallArg > &arg) override |
Preview data for given socket Method called by WS handler before processing websocket data Returns kTRUE when user should ignore such http request - it is for internal use. | |
void | Send (const void *buf, int len) override |
Send binary data via connection. | |
void | SendCharStar (const char *buf) override |
Send const char data Either do it immediately or keep in internal buffer. | |
void | SendHeader (const char *hdr, const void *buf, int len) override |
Send binary data with text header via connection. | |
Public Member Functions inherited from THttpWSEngine | |
virtual | ~THttpWSEngine ()=default |
Protected Types | |
enum | EBufKind { kNoBuf , kTxtBuf , kBinBuf } |
Protected Member Functions | |
virtual Bool_t | CanSendDirectly () override |
Indicate that polling requests is there or buffer empty and can be immediately invoked. | |
std::string | MakeBuffer (const void *buf, int len, const char *hdr=nullptr) |
!< default reply on the longpoll request | |
Protected Member Functions inherited from THttpWSEngine | |
THttpWSEngine ()=default | |
virtual Bool_t | SupportSendThrd () const |
Indicate if engine require extra thread to complete postponed thread operation. | |
Protected Attributes | |
std::string | fBuf |
!< if buffered data available | |
std::string | fBufHeader |
!< buffered data | |
EBufKind | fBufKind {kNoBuf} |
!< hold polling request, which can be immediately used for the next sending | |
std::mutex | fMutex |
!< if true, only content can be used for data transfer | |
std::shared_ptr< THttpCallArg > | fPoll |
!< protect polling request to use it from different threads | |
bool | fRaw {false} |
Static Protected Attributes | |
static const std::string | gLongPollNope = "<<nope>>" |
!< buffered header | |
Friends | |
class | THttpServer |
|
protected |
Enumerator | |
---|---|
kNoBuf | |
kTxtBuf | |
kBinBuf |
Definition at line 28 of file THttpLongPollEngine.h.
THttpLongPollEngine::THttpLongPollEngine | ( | bool | raw = false | ) |
constructor
Definition at line 34 of file THttpLongPollEngine.cxx.
|
virtualdefault |
|
overrideprotectedvirtual |
Indicate that polling requests is there or buffer empty and can be immediately invoked.
Reimplemented from THttpWSEngine.
Definition at line 262 of file THttpLongPollEngine.cxx.
clear request, normally called shortly before destructor
Implements THttpWSEngine.
Definition at line 50 of file THttpLongPollEngine.cxx.
|
overridevirtual |
returns ID of the engine, created from this pointer
Implements THttpWSEngine.
Definition at line 41 of file THttpLongPollEngine.cxx.
|
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 69 of file THttpLongPollEngine.cxx.
|
overridevirtual |
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 231 of file THttpLongPollEngine.cxx.
|
overridevirtual |
Preview data for given socket Method called by WS handler before processing websocket data Returns kTRUE when user should ignore such http request - it is for internal use.
Reimplemented from THttpWSEngine.
Definition at line 194 of file THttpLongPollEngine.cxx.
Send binary data via connection.
Implements THttpWSEngine.
Definition at line 99 of file THttpLongPollEngine.cxx.
|
overridevirtual |
Send const char data Either do it immediately or keep in internal buffer.
Reimplemented from THttpWSEngine.
Definition at line 161 of file THttpLongPollEngine.cxx.
|
overridevirtual |
Send binary data with text header via connection.
Implements THttpWSEngine.
Definition at line 128 of file THttpLongPollEngine.cxx.
|
friend |
Definition at line 24 of file THttpLongPollEngine.h.
|
protected |
!< if buffered data available
Definition at line 34 of file THttpLongPollEngine.h.
|
protected |
!< buffered data
Definition at line 35 of file THttpLongPollEngine.h.
!< hold polling request, which can be immediately used for the next sending
Definition at line 33 of file THttpLongPollEngine.h.
|
protected |
!< if true, only content can be used for data transfer
Definition at line 31 of file THttpLongPollEngine.h.
|
protected |
!< protect polling request to use it from different threads
Definition at line 32 of file THttpLongPollEngine.h.
|
protected |
Definition at line 30 of file THttpLongPollEngine.h.
|
staticprotected |
!< buffered header
Definition at line 36 of file THttpLongPollEngine.h.