12 #ifndef ROOT_THttpLongPollEngine 13 #define ROOT_THttpLongPollEngine 34 std::shared_ptr<THttpCallArg>
fPoll;
38 std::string
MakeBuffer(
const void *buf,
int len,
const char *hdr =
nullptr);
47 virtual void Send(
const void *buf,
int len);
51 virtual void SendHeader(
const char *hdr,
const void *buf,
int len);
55 virtual void PostProcess(std::shared_ptr<THttpCallArg> &arg);
virtual void PostProcess(std::shared_ptr< THttpCallArg > &arg)
Normally requests from client does not replied directly for longpoll socket Therefore one can use suc...
virtual UInt_t GetId() const
returns ID of the engine, created from this pointer
std::string fHdr
! optional header for raw data
virtual void Send(const void *buf, int len)
Send binary data via connection - not supported.
static const std::string gLongPollNope
!< entries submitted to client
std::string MakeBuffer(const void *buf, int len, const char *hdr=nullptr)
!< default reply on the longpoll request
std::shared_ptr< THttpCallArg > fPoll
!< if true, only content can be used for data transfer
std::queue< QueueItem > fQueue
!< hold polling request, which can be immediately used for the next sending
virtual void ClearHandle()
clear request, waiting for next portion of data
virtual void SendCharStar(const char *buf)
Send const char data Either do it immediately or keep in internal buffer.
THttpLongPollEngine(bool raw=false)
constructor
virtual void SendHeader(const char *hdr, const void *buf, int len)
Send binary data with text header via connection - not supported.
virtual Bool_t PreviewData(std::shared_ptr< THttpCallArg > &arg)
Preview data for given socket function called in the user code before processing correspondent websoc...
std::string fData
! text or binary data
QueueItem(bool bin, std::string &&data, const std::string &hdr="")
bool fBinary
! is binary data