13std::shared_ptr<ROOT::Experimental::RWebWindow> window;
17void ProcessData(
unsigned connid,
const std::string &arg)
19 printf(
"Get msg %s \n", arg.c_str());
23 if (arg ==
"get_text") {
25 window->Send(connid,
Form(
"Message%d", counter));
26 }
else if (arg ==
"get_binary") {
29 for (
int n = 0;
n < 10; ++
n)
31 window->SendBinary(connid, arr,
sizeof(arr));
32 }
else if (arg ==
"halt") {
34 window->TerminateROOT();
45 window->SetDefaultPage(
"file:client.html");
48 window->SetDataCallBack(ProcessData);
50 window->SetGeometry(300, 500);
char * Form(const char *fmt,...)
static std::shared_ptr< RWebWindow > Create()
Create new RWebWindow Using default RWebWindowsManager.