lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Transfer archive of PC by ethernet


From: Kieran Mansley
Subject: Re: [lwip-users] Transfer archive of PC by ethernet
Date: Tue, 21 Jul 2009 10:55:19 +0100

On Tue, 2009-07-21 at 11:36 +0200, Oscar F wrote:

> My first idea is to use socket TCP conecction, but what is the maximun
> size of file to transfer, 

There is no limit on the size of a TCP transfer.

> because if i use the recv function i need to store the data of files,
> and i haven´t enough memory in stack in SRAM internal for this.

So each time you read data with the recv function, buffer as much as you
can and then write it out to the SDRAM.

> If the size of dates is divided in block of for example 2K while
> recive this block i´ll transfer this block to SDRAM and i ´ll solve
> the problem. Is this possible?

Yes, it is possible to use recv to read (up to) 2K bytes at a time.  It
may return less, in which case you would call it again with the space
you have left as the length argument, and repeat this until it has given
you the amount you want.  Then you can write it to SDRAM and start again
to get another 2K bytes.  This is just like using recv() on any system -
lwIP's recv() function is just the same as you would expect.

Kieran





reply via email to

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