lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Failed to send large files ( > 65 kB ) over TCP


From: Bill Auerbach
Subject: RE: [lwip-users] Failed to send large files ( > 65 kB ) over TCP
Date: Tue, 7 Sep 2010 12:58:50 -0400

Simon,

 

As this example is based on the the contrib folder httpserver_raw in unmodified source, I am surprised this hasn’t come up before.  There was a problem once that the file system would truncate files to 64k when sizeof int was 2, but on the NIOS II int is 32-bits and there is no 64k file size limit.  Perhaps this demo has always had this limitation – I don’t know.

 

I am readying for a trade show and will look at this more when I get a chance (which is next week at the soonest).

 

Bill  ß the one who posted the NIOS II TSE example.

 

From: address@hidden [mailto:address@hidden On Behalf Of Richner Simon
Sent: Monday, September 06, 2010 11:18 AM
To: Mailing list for lwIP users
Subject: [lwip-users] Failed to send large files ( > 65 kB ) over TCP

 

Hi,

 

I'm using LwIP 1.3.2 without OS. My driver is based on the Altera TSE example, posted on the LwIP Wiki driver page. This example includes a minimal HTTP server which I use as basis and which works without problems.

 

Then I replaced the gif-image, located on the server example, by a larger image (130kB). As far as I understand, the send_data function in httpd.c should handle this situation, splitting the pictures in several segments, matching the actual free size of the tcp_sendbuf. After sending part of the image, the http_sent function should then continue to send the rest of the image.

 

As I already mentioned, with images, having less than 65'536 bytes, this works as I would expect. With larger images, I get a Connection RESET merssage from the tcp_process function in tcp_in.c rigth after the first segment was sent. This will immediately free all pbufs, belonging to the pcb_sndqueue - including those that have not been sent yet.

 

My questions:

 

- Is there a size limit in tcp_write, other than the one, given by tcp_sndbuf(pcb)?  If yes, can I change it, what are the consequences?

- Is it normal to get reset requests from the client, when using the Altera TSE example driver? What situation would cause a client to send a reset request?

 

Best Regards

Simon

 

 


reply via email to

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