Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
fe548f14
Commit
fe548f14
authored
5 years ago
by
Sergey Linev
Browse files
Options
Downloads
Patches
Plain Diff
[http] add support of Windows in tutorials/http/ws.C example
parent
a8b0b3d1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tutorials/http/ws.C
+5
-2
5 additions, 2 deletions
tutorials/http/ws.C
with
5 additions
and
2 deletions
tutorials/http/ws.C
+
5
−
2
View file @
fe548f14
...
...
@@ -13,9 +13,9 @@ class TUserHandler : public THttpWSHandler {
UInt_t
fWSId
;
Int_t
fServCnt
;
TUserHandler
(
const
char
*
name
=
0
,
const
char
*
title
=
0
)
:
THttpWSHandler
(
name
,
title
),
fWSId
(
0
),
fServCnt
(
0
)
{}
TUserHandler
(
const
char
*
name
=
nullptr
,
const
char
*
title
=
nullptr
)
:
THttpWSHandler
(
name
,
title
),
fWSId
(
0
),
fServCnt
(
0
)
{}
// load custom HTML page when open correpondent address
// load custom HTML page when open corre
s
pondent address
TString
GetDefaultPageContent
()
{
return
"file:ws.htm"
;
}
virtual
Bool_t
ProcessWS
(
THttpCallArg
*
arg
)
...
...
@@ -75,9 +75,12 @@ void ws()
printf
(
"Starting browser with URL address %s
\n
"
,
addr
);
printf
(
"In browser content of ws.htm file should be loaded
\n
"
);
printf
(
"Please be sure that ws.htm is provided in current directory
\n
"
);
if
(
gSystem
->
InheritsFrom
(
"TMacOSXSystem"
))
gSystem
->
Exec
(
Form
(
"open %s"
,
addr
));
else
if
(
gSystem
->
InheritsFrom
(
"TWinNTSystem"
))
{
gSystem
->
Exec
(
Form
(
"start %s"
,
addr
));
else
gSystem
->
Exec
(
Form
(
"xdg-open %s &"
,
addr
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment