Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chuck cranor
margo
Commits
0533702d
Commit
0533702d
authored
Apr 21, 2016
by
Philip Carns
Browse files
make example server take addr argument
parent
ef88768d
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/server.c
View file @
0533702d
...
...
@@ -29,20 +29,20 @@ int main(int argc, char **argv)
hg_class_t
*
hg_class
;
int
single_pool_mode
=
0
;
if
(
argc
>
2
)
if
(
argc
>
3
||
argc
<
2
)
{
fprintf
(
stderr
,
"Usage: ./server <single>
\n
"
);
fprintf
(
stderr
,
"Usage: ./server
<listen_addr>
<single>
\n
"
);
fprintf
(
stderr
,
" Note: the optional
\"
single
\"
argument makes the server use a single ABT pool for both HG progress and RPC handlers.
\n
"
);
return
(
-
1
);
}
if
(
argc
==
2
)
if
(
argc
==
3
)
{
if
(
strcmp
(
argv
[
1
],
"single"
)
==
0
)
if
(
strcmp
(
argv
[
2
],
"single"
)
==
0
)
single_pool_mode
=
1
;
else
{
fprintf
(
stderr
,
"Usage: ./server <single>
\n
"
);
fprintf
(
stderr
,
"Usage: ./server
<listen_addr>
<single>
\n
"
);
fprintf
(
stderr
,
" Note: the optional
\"
single
\"
argument makes the server use a single ABT pool for both HG progress and RPC handlers.
\n
"
);
return
(
-
1
);
}
...
...
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
/* boilerplate HG initialization steps */
/***************************************/
hg_class
=
HG_Init
(
"tcp://localhost:1234"
,
HG_TRUE
);
hg_class
=
HG_Init
(
argv
[
1
]
,
HG_TRUE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment