[Top][All Lists]

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

Re: Re: [lwip-users] Problem with multi file sending http server

From: Mariusz Dz
Subject: Re: Re: [lwip-users] Problem with multi file sending http server
Date: Thu, 25 Nov 2010 16:33:51 +0100

lwIP version is 1.3.1, the whole lwip with port is from stm project for
stm32f107. The lwIP is working alone as http server, i "connect" to the
server by browser on one notebook so the transferr is html, css, js small
graphic files. Only change in part i use from stm project is add
TCP_WRITE_FLAG_COPY flag to tcp_write ->
tcp_write(pcb, hs->file, len, TCP_WRITE_FLAG_COPY);  After get data frome sd
card i use: send_data(pcb, hs); tcp_sent(pcb, http_sent); tcp_output(pcb);
(or without tcp_output that dont make any cange) 

With GET question send to lwIP server i didnt seen any problem, some where
about 400 chars long. As i wrote there no problem if i want get 1 to 3 or 4
files but more files make problem. The http server dont have to be very

About the 3. question i mean how make that i dont have to read all file at
onec from sd card, but read some data, half file, send it the rest of file
and it will be  treated as one file.

I will se that wireshark, thanks Kieran for answer

>On Thu, 2010-11-25 at 12:50 +0100, Mariusz Dz wrote:
>> i spent some time looking for answers to problems i have, and as i have
>> found a solution on it, i will ask here:
>> 1)    i have http server on lwip, the transfer of single file are fine,
>> but when site use more files there is problem in sending data, which is
>> losing some data and html page dont look as it should (the data are read
>> from SD card)?
>Which lwIP version, port, and API are you using?  Can you give an
>example of how you send data.  Are there multiple http server threads?
>How does your driver passed received packets up to lwIP?  Is lwIP
>running at both ends of the connection or just at the server?
>If you want to debug this further I would suggest getting a packet
>capture with a tool like wireshark and comparing the data you see on the
>wire with what you expect the file to look like.  wireshark will
>reassemble a TCP stream and show you the complete data contents of that
>stream, so it should be easy to compare that to the file you want to
>> 2)    is there a kind of flag that i can use to check if the data where
>> send and conection i close?
>> 3)    how send one file http by sending small packets  of file(for
>> 100 bytes), how get that by the host it will be treated as one file 
>TCP does this for you.  You can't control how the data stream is
>segmented, but the other end will reassemble it all.

Duzi chlopcy lubia wampiry i krew.

reply via email to

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