>-----Original Message----- >From: [email protected] >[mailto:[email protected]] 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 version. Bill _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
