lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] basic question on httpserver-netconn application.


From: address@hidden
Subject: Re: [lwip-users] basic question on httpserver-netconn application.
Date: Wed, 11 Feb 2009 21:53:24 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Francois Bouchard wrote:
Ok yes, I should have looked before posting, but thanks.  Anyway I got the
webserver working now, and this is my starting point to make a basic echo
web server.  From what I see the server netconn closes between requests in
order to accept new ones.  But what if my client needs to stay connected?  I
beleive the server should'nt closes nor deletes the netconn.  I try to
program this but without success, any hints would be welcome

I guess what you want is to use one TCP connection for multiple HTTP requests? I can't remember exactly, but I think that wasn't introduced before HTTP 1.1...

Anyway, the httpserver-netconn is only an example, not meant to be used in productive environment like it is!

The downside is you would either need something like select or you would block one thread for one connection, even if the client doesn't reuse the connection immediately. To implement this, the basline is: don't close established connections unless receiving 0-length for the first time (which means the other side has closed the connection). That should do the trick.

Simon




reply via email to

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