lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Send large file stored in the memory


From: Goldschmidt Simon
Subject: RE: [lwip-users] Send large file stored in the memory
Date: Tue, 26 Jun 2007 17:56:58 +0200

> But what about a large file stored in the Virtex II external memory? Do
> we have to chunk it so that we put payload equivalent in each pbuf and
> then chains them? Or is there
> a function already doing so?
> Because we tried to send lots of data using tcp_write by sending
> characters and the maximum we could do was around 7000, then the server
> crashes.
>
> I've also heard about tcp_output, what is it exactly?

Could it be that either your buffers or your tcp send window is configured to around 7000 bytes? tcp_write only enqueues data in the pcb. You have to call tcp_output to really send the data.

Note that the length argument for tcp_write is a 16-bit int, so to send really large files (bigger than 64 KBytes), you have to call tcp_write multiple times with 0xffff as length. Also, you may not call tcp_write with more than tcp_sndbuf(tcp_pcb) of data!


Hope that helps.
Simon.


reply via email to

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