12 #ifndef ROOT_THttpWSEngine
13 #define ROOT_THttpWSEngine
22 #include <condition_variable>
29 friend class THttpWSHandler;
32 bool fDisabled{
false};
34 std::thread fSendThrd;
35 bool fHasSendThrd{
false};
38 std::condition_variable fCond;
41 enum { kNone, kData, kHeader, kText } fKind{kNone};
46 THttpWSEngine() =
default;
49 virtual Bool_t SupportSendThrd()
const {
return kFALSE; }
52 virtual Bool_t CanSendDirectly() {
return kTRUE; }
55 virtual ~THttpWSEngine() =
default;
57 virtual UInt_t GetId()
const = 0;
59 virtual void ClearHandle(Bool_t) = 0;
61 virtual void Send(
const void *buf,
int len) = 0;
63 virtual void SendHeader(
const char *hdr,
const void *buf,
int len) = 0;
65 virtual void SendCharStar(
const char *str);
67 virtual Bool_t PreProcess(std::shared_ptr<THttpCallArg> &arg);
69 virtual void PostProcess(std::shared_ptr<THttpCallArg> &arg);