lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] restrict number of connections of HTTP-server


From: Iwan Budi Kusnanto
Subject: Re: [lwip-users] restrict number of connections of HTTP-server
Date: Fri, 4 Nov 2011 14:20:56 +0700

On Fri, Nov 4, 2011 at 1:54 PM, Ruben <address@hidden> wrote:
> Hi
>
> Is it an option to delay the request after two files are open.
> send a respons to the browser after one file is fully transferred and is
> ready to open the next.
> If no connection timeout occurs it might be possible or not ?

I think it is possible.
I just remember that i use similar technique.
max X active socket (with transfer file)
max Y delayed socket.
if number of sockets reaching X+Y, then i simply close subsequent socket.
It works, but i'm not sure about the performance.


>
> Ruben
>
>
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
> From: address@hidden
> To: address@hidden
> Date: 7:43:49, 11.04.2011
> Subject: Re: [lwip-users] restrict number of connections of HTTP-server
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>
>
>
>>>On Wed, Nov 2, 2011 at 4:30 PM, <address@hidden> wrote:
>>> > Hi,
>>> >
>>> > I am using lwip 1.4.0 and the httpserver_raw. My filesystem supports
>>> > only
>>> > 2 open files at the same time. When I am opening an html file that
>>> > contains for example 5 images, the browser tries to the load the images
>>> > in
>>> > parallel. Because the fs_open in http_find_file() fails for the third
>>> > image and an error code 404 is returned, the browser displays only two
>>> > images. When I restrict the number of connection to two in the browser,
>>> > the html page is displayed correctly. But I do not want to modify the
>>> > browser settings.
>>> >
>>> > Is there a way to restrict the number of connections that is handled by
>>> > web browsers correctly?
>>>
>>> In your http server, you can count the number of active sockets.
>>>
>>> if 3rd socket come, simply close the socket.
>>>
>>> Other alternative to simply close the socket is sending 503 error code
>>> with Retry-After header.
>>> But AFAIK, each browser have different behaviour againts 503 &
>>> Retry-After.
>>>
>>>
>>> >
>>> > Regards
>>> > Mathias
>>> >
>>> >
>>> > _______________________________________________
>>> > lwip-users mailing list
>>> > address@hidden
>>> > https://lists.nongnu.org/mailman/listinfo/lwip-users
>>> >
>>>
>>> _______________________________________________
>>> lwip-users mailing list
>>> address@hidden
>>> https://lists.nongnu.org/mailman/listinfo/lwip-users
>>>
>>>
>>>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]