Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipackets webserver modification #93

Merged
merged 19 commits into from
Jul 22, 2013
Merged

Multipackets webserver modification #93

merged 19 commits into from
Jul 22, 2013

Conversation

fredycpu
Copy link
Contributor

issue #68 and issue #94
modification proposition
exemples multipacket , multipacketSD (need tinyfat library) , SSDP
sorry for my english , i'm french

fredycpu added 15 commits July 19, 2013 18:34
Added support for multi packets 
so you can send more than one packet of asked webpage
has worked for an 240 mega byte file transfer wihout packet lost
speed about 100kbyte / seconds
added new functions (in tcpip.cpp
httpServerReply_with_flags() 
to told the navigator if it is or not the last packet

httpServerReplyAck () 
reply to the navigator an ACK (2. part of three way handshaking)
Exemple number one
Send to the navigator a webpage contained in five packets (page a b c d e)
exemple one
send a webpage composed of five packets with 900 bytes buffer, 
you could have 840 * 5 byte page (five packets is only for exemple you can send more packets there is no limitations)
exemple two 
all the web data are on the SD card
tinyfat library don't support folders so all files are in root 
.hea are headers files 
if you ask an .htm file , arduino will send htm.hea witch contain 
HTTP/1.0 200 OK\r\n
Content-Type: text/html\r\n
Server: Arduino ethercard fred mod\r\n
\r\n
an then the requested file
if you type http://192.168.0.66/test.htm
you will see the test.htm page on the root of your SD card
the sd library use only 8+3 files don't ark .html files you will become not found..
you can store .js files with correct js.hea
change only the mime type (google it to find)
you can specify in header files more options 
Cache (for pictures) so you dont have to reload it every time
the default header is txt.hea
HTTP/1.0 200 OK\r\n
Content-Type: text/plain\r\n
Server: Arduino ethercard fred mod\r\n
\r\n
i have added a server name for exemple but it's not needed
sorry it was code for another test will be come soon : SSDP protocol
reduce ram used it was 80 for SD library while could contain directories but tinyfat doesn't support directories !
i know i must really read my code :-) anothers experiments before brigning this thing working ....
erased unneded code
jcw added a commit that referenced this pull request Jul 22, 2013
Multipackets webserver modification
@jcw jcw merged commit 6308d99 into njh:master Jul 22, 2013
@jcw
Copy link

jcw commented Jul 22, 2013

Thanks - committed. I haven't tried this, but am assuming your changes will not affect the existing uses of the EtherCard library too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants