lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LW IP - TCP instantaneous data transmission


From: Mike Fleetwood
Subject: Re: [lwip-users] LW IP - TCP instantaneous data transmission
Date: Thu, 1 Sep 2016 11:57:46 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

Hi,

Might I add a suggestion from my experience?


I also have a system with limited memory availability.  When my system needs to serve a web page, I serve most of it in chunks from ROM, constructung the variable parts in memory when needed.


The page server includes multiple function calls, as below:

  netconn_write(thisconn, http_page_start, strlen(http_page_start), NETCONN_NOCOPY);
  netconn_write(thisconn, http_page_style_open, strlen(http_page_style_open), NETCONN_NOCOPY);


where the macros "http_page_start" etc. are defined constant strings containing several lines of html.


I find this method uses very little memory, no matter how big the eventual page served is.


Hope this is useful.


Regards,

Mike Fleetwood.


On 31/08/2016 19:56, Noam Weissman wrote:

Hi Anand,


I do not know what HTTP server you use but what I sent earlier is just a skeleton or pseudo code

for you to get an idea on how to send a large buffer in chunks.


If you cannot send the hole buffer (make sense) and you are limited with memory you must wait

for the TCP stack to free the buffer it used to send your data before you can send more. Here comes

the sent call back in hand... it synchronizes sending and freeing of memory.


Do you understand that  ?


Try and follow the code I wrote in an earlier reply.


Good luck,

Noam.




From: lwip-users <address@hidden> on behalf of address@hidden <address@hidden>
Sent: Wednesday, August 31, 2016 9:31 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LW IP - TCP instantaneous data transmission
 
anand arjunan wrote:
> Should I do something in the http_sent callback to make room for next
> set of data ?

I'm afraid I don't really understand your questions. As Noam said, have
a look at the http server, I guess you can learn everything you need
from there.

SImon

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
lists.nongnu.org
Welcome to the lwip-users mailing list. Use it to ask questions, share your experience and discuss new ideas. To see the collection of prior postings to the list ...



_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

-- 
FACE Systems Ltd
The Old Boat House
Cadgwith
Cornwall TR12 7JX
T:01326 291031
M:07831 401464

reply via email to

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