12 #ifndef ROOT_THttpWSHandler 13 #define ROOT_THttpWSHandler 30 std::vector<std::shared_ptr<THttpWSEngine>>
fEngines;
void SendWS(UInt_t wsid, const void *buf, int len)
Send binary data via given websocket id.
Bool_t HasWS(UInt_t wsid) const
Return kTRUE if websocket with given ID exists.
Bool_t HandleWS(std::shared_ptr< THttpCallArg > &arg)
Process request to websocket Different kind of requests coded into THttpCallArg::Method "WS_CONNECT" ...
virtual ~THttpWSHandler()
destructor Delete all websockets handles
THttpWSEngine * FindEngine(UInt_t id) const
Find websocket connection handle with given id.
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
Int_t GetNumWS() const
Returns current number of websocket connections.
void CloseWS(UInt_t wsid)
Close connection with given websocket id.
void SendCharStarWS(UInt_t wsid, const char *str)
Send string via given websocket id.
void SendHeaderWS(UInt_t wsid, const char *hdr, const void *buf, int len)
Send binary data with binary data via given websocket id.
UInt_t GetWS(Int_t num=0) const
Return websocket id with given sequential number Number of websockets return with GetNumWS() method...
virtual TString GetDefaultPageContent()
Provides content of default web page for registered web-socket handler Can be content of HTML page or...
std::vector< std::shared_ptr< THttpWSEngine > > fEngines
! list of active WS engines (connections)
void RemoveEngine(THttpWSEngine *engine)
Remove and destroy WS connection.
virtual Bool_t ProcessWS(THttpCallArg *arg)=0
THttpWSHandler(const char *name, const char *title)
THttpWSHandler.