[Top][All Lists]

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

RE: [lwip-users] Improved HTTP webserver (was: http_sent cb shows 1 byte

From: Bill Auerbach
Subject: RE: [lwip-users] Improved HTTP webserver (was: http_sent cb shows 1 byte trailer [RAW])
Date: Wed, 12 Aug 2009 12:52:55 -0400

>-----Original Message-----
>From: address@hidden
>[mailto:address@hidden On
>Behalf Of Simon Goldschmidt
>Sent: Wednesday, August 12, 2009 8:50 AM
>To: Mailing list for lwIP users
>Subject: RE: [lwip-users] http_sent cb shows 1 byte trailer [RAW]
>I thought of something like that, also. The problem is memory usage (or
>tcp raw API limitations?): currently, the httpd returns static memory
>(i.e. tcp doesn't need to copy). With variables in it, tcp would have to
>copy, but we'd need to create the page before that. This would mean we
>need the memory twice (1. create the char[] containing the file and 2.
>tcp copies it into pbufs).
>To prevent that, we'd have to move from such a char[] to a callback that
>generates the bytes we need before passing them to tcp_write (is that
>what Luminary did?), but that's quite hard.

Yes, they parse and feed data on the fly.  Memory usage is low - it has to
be because many of their processors have 64k onboard RAM only.

>I like the idea. I'm currently in the process of restructuring the code
>of httpd.c in contrib, but I want to wait until after the release before
>committing it.

Sounds like a good idea with all the recent posts about the current contrib


reply via email to

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