25 TUserHandler(
const char *
name =
nullptr,
const char *title =
nullptr) : THttpWSHandler(
name, title) {}
43 printf(
"Client connected %d\n", fWSId);
49 printf(
"Client disconnected\n");
56 printf(
"Client msg: %s\n", str.
Data());
79 TUserHandler *handler =
new TUserHandler(
"name1",
"title1");
83 const char *addr =
"http://localhost:8090/folder1/name1/";
85 printf(
"Starting browser with URL address %s\n", addr);
86 printf(
"In browser content of ws.htm file should be loaded\n");
87 printf(
"Please be sure that ws.htm is provided in current directory\n");
89 if (
gSystem->InheritsFrom(
"TMacOSXSystem"))
91 else if (
gSystem->InheritsFrom(
"TWinNTSystem"))
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char * AsString() const
Return the date & time as a string (ctime() format).
UInt_t GetWSId() const
get web-socket id
const void * GetPostData() const
return pointer on posted with request data
Long_t GetPostDataLength() const
return length of posted with request data
Bool_t IsMethod(const char *name) const
returns kTRUE if post method is used
Online http server for arbitrary ROOT application.
Bool_t Register(const char *subfolder, TObject *obj)
Register object in subfolder.
Class for user-side handling of websocket with THttpServer.
virtual Bool_t ProcessWS(THttpCallArg *arg)=0
Int_t SendCharStarWS(UInt_t wsid, const char *str)
Send string via given websocket id.
virtual TString GetDefaultPageContent()
Provides content of default web page for registered web-socket handler Can be content of HTML page or...
virtual Bool_t HandleTimer(TTimer *timer)
Execute action in response of a timer timing out.
const char * Data() const
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Handles synchronous and a-synchronous timer events.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.