aboutsummaryrefslogtreecommitdiff
path: root/src/examples/dual_stack_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/dual_stack_example.c')
-rw-r--r--src/examples/dual_stack_example.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/examples/dual_stack_example.c b/src/examples/dual_stack_example.c
index ff92e3c9..0436cbb3 100644
--- a/src/examples/dual_stack_example.c
+++ b/src/examples/dual_stack_example.c
@@ -57,29 +57,23 @@ ahc_echo (void *cls,
57 return ret; 57 return ret;
58} 58}
59 59
60
60int 61int
61main (int argc, char *const *argv) 62main (int argc, char *const *argv)
62{ 63{
63 struct MHD_Daemon *d4; 64 struct MHD_Daemon *d;
64 struct MHD_Daemon *d6;
65 65
66 if (argc != 2) 66 if (argc != 2)
67 { 67 {
68 printf ("%s PORT\n", argv[0]); 68 printf ("%s PORT\n", argv[0]);
69 return 1; 69 return 1;
70 } 70 }
71 d4 = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, 71 d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_DUAL_STACK,
72 atoi (argv[1]), 72 atoi (argv[1]),
73 NULL, NULL, &ahc_echo, PAGE, 73 NULL, NULL, &ahc_echo, PAGE,
74 MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 120,
75 MHD_OPTION_END);
76 d6 = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_IPv6,
77 atoi (argv[1]),
78 NULL, NULL, &ahc_echo, PAGE,
79 MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 120, 74 MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 120,
80 MHD_OPTION_END); 75 MHD_OPTION_END);
81 (void) getc (stdin); 76 (void) getc (stdin);
82 MHD_stop_daemon (d4); 77 MHD_stop_daemon (d);
83 MHD_stop_daemon (d6);
84 return 0; 78 return 0;
85} 79}