[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Runnking MHD_deamon for infinite amount of time
From: |
arnuld uttre |
Subject: |
[libmicrohttpd] Runnking MHD_deamon for infinite amount of time |
Date: |
Fri, 10 Apr 2009 12:17:00 +0530 |
I am working with libmicrohttpd and I have looked at the
minimal_example.c which uses this model:
d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
atoi (argv[1]),
NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_END);
if (d == NULL)
return 1;
sleep (atoi (argv[2]));
MHD_stop_daemon (d);
I want to tun MHD_deamon continuously just like httpd server keeps on
listening for infinite amount of time, no matter whether some browser
sends it the request or not, which is what a daemon does, keep on
runnig nt he background forever. I have 2 options:
1) don't use sleep() and don't use MHD_stop_daemon() . In that case
MHD_daemon stops after 1 second.
2) Pass the UINT_MAX . It will expire after some specific time
Is there anyway that using select initernally can I keep on running
the daemon for infinite amount of time ?
--
http://uttre.wordpress.com/2008/05/14/the-lost-love-of-mine/
- [libmicrohttpd] Runnking MHD_deamon for infinite amount of time,
arnuld uttre <=