[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Re: timeout problem
From: |
Christian Grothoff |
Subject: |
[libmicrohttpd] Re: timeout problem |
Date: |
Tue, 27 Jul 2010 19:21:12 +0200 |
User-agent: |
KMail/1.13.2 (Linux/2.6.32-23-generic; KDE/4.4.2; i686; ; ) |
I suspect your integers don't have the right types on your platform, so you
may need to cast them (good idea anyway) to be sure to get "unsigned int":
mhd_daemon = MHD_start_daemon( MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
PORT,
NULL, NULL,
&answer_to_connection, NULL,
MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL,
MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 2,// FD_SETSIZE - 4
MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 2,// 0: unlimit
MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 1800,// sec, 0: no timeout
MHD_OPTION_END );
Most likely this will do.
Best,
Christian
On Tuesday, July 27, 2010 05:19:48 pm Dmitriy Vasil'ev wrote:
> Hello Christian,
>
> Thank you for your patient!
> I fix my bug while uploading.
>
> I have another question :)
>
> If I compile my code and start daemon with option :
>
> mhd_daemon = MHD_start_daemon( MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
> PORT,
> NULL, NULL,
> &answer_to_connection, NULL,
> MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL,
> MHD_OPTION_CONNECTION_LIMIT, 2,// FD_SETSIZE - 4
> MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2,// 0: unlimit
> MHD_OPTION_CONNECTION_TIMEOUT, 1800,// sec, 0: no timeout
> MHD_OPTION_END );
>
> daemon is started, but I cannot connect to web server.
>
> If I delete option MHD_OPTION_CONNECTION_TIMEOUT, 1800, compile the code,
> connect is succesfull.
>
> Another variant:
> I compile my code, reboot my board and start daemon without option
> MHD_OPTION_CONNECTION_TIMEOUT, 1800,
> connect is succesfull.
>
> I recompile my code with option MHD_OPTION_CONNECTION_TIMEOUT, 1800
> and start it (without reboot).
> connect is succesfull!
>
> What wrong?
>
>
> Thank you,
> Dmitriy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] Re: timeout problem,
Christian Grothoff <=