12#ifndef ROOT_THttpWSEngine
13#define ROOT_THttpWSEngine
22#include <condition_variable>
61 virtual void Send(
const void *buf,
int len) = 0;
69 virtual void PostProcess(std::shared_ptr<THttpCallArg> &arg);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Internal instance used to exchange WS functionality between THttpServer and THttpWSHandler.
bool fWaiting
! if condition wait is called
bool fMTSend
! true when send operation runs, set under locked fMutex from WSHandler
virtual Bool_t PreProcess(std::shared_ptr< THttpCallArg > &arg)
Method should be invoked before processing data coming from websocket If method returns kTRUE,...
std::condition_variable fCond
! condition used to sync with sending thread
std::mutex fMutex
! protects all data behind
virtual void SendCharStar(const char *str)
Envelope for sending string via the websocket.
virtual UInt_t GetId() const =0
std::thread fSendThrd
! dedicated thread for all send operations
bool fHasSendThrd
! if thread was started one have to call join method for it
bool fDisabled
! true shortly before cleanup, set under locked fMutex from WSHandler
virtual void SendHeader(const char *hdr, const void *buf, int len)=0
virtual Bool_t CanSendDirectly()
One always can send data to websocket - as long as previous send operation completed.
virtual void PostProcess(std::shared_ptr< THttpCallArg > &arg)
Method invoked after user process data received via websocket.
virtual Bool_t SupportSendThrd() const
Indicate if engine require extra thread to complete postponed thread operation.
virtual void Send(const void *buf, int len)=0
bool fSending
! performing send operation in other thread
std::string fData
! data (binary or text)
virtual ~THttpWSEngine()=default
enum THttpWSEngine::@153 kNone
! kind of operation
virtual void ClearHandle(Bool_t)=0
Class for user-side handling of websocket with THttpServer.