34 printf(
"Client connected %d\n",
fWSId);
40 printf(
"Client disconnected\n");
47 printf(
"Client msg: %s\n", str.
Data());
74 const char *addr =
"http://localhost:8090/folder1/name1/";
76 printf(
"Starting browser with URL address %s\n", addr);
77 printf(
"In browser content of ws.htm file should be loaded\n");
78 printf(
"Please be sure that ws.htm is provided in current directory\n");
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
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
Bool_t Register(const char *subfolder, TObject *obj)
Register object in subfolder.
Int_t SendCharStarWS(UInt_t wsid, const char *str)
Send string via given websocket id Returns -1 - in case of error, 0 - when operation was executed imm...
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
const char * Data() const
TString & Append(const char *cs)
virtual Int_t Exec(const char *shellcmd)
Execute a command.
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.
Bool_t ProcessWS(THttpCallArg *arg) override
Bool_t HandleTimer(TTimer *) override
per timeout sends data portion to the client
TString GetDefaultPageContent() override
Provides content of default web page for registered web-socket handler Can be content of HTML page or...
TUserHandler(const char *name=nullptr, const char *title=nullptr)