Hi,
I have a question concerning the implementation of the webserver code for client.println. Here is what i did, i decided to watch the transmissions using wireshark when the PC goes to the Arduino, and gets the web page. Just to see how the packets were being formed and if they made sense. (You know, speed, net traffic, etc). The HTML could not easily be seen for some reason, but with some work, it became apparent that the arduino is serving up the web page one character at a time, that is, on each back and forth with the computer, the message appears to be being formed as 1 byte long. For each HTTP, the length was one byte!
So, for each byte in the client.println(F'') you end up with over 114 characters being sent, one ethernet frame at a time. 54 going one way, then 60 going into the PC. This means that the single client.println shown below, with almost 100 characters to transmit, will result in 11,400 bytes being transfered. Every single character in the line below consists of a back and forth's between the arduino and the PC.
client.println(F("<FORM METHOD='LINK' ACTION='http://192.168.1.177/H\r'><INPUT TYPE='submit' VALUE='Light Brighten'></FORM> "));
Could someone explain how i get the arduino to send the entire line in one proper frame! I would expect that this would have taken, 54 bytes from the PC, and then about 160 bytes from the arduino, and not 11,400 bytes, for this line.
The stuff seems to work, but appears to be really inefficient use of the network.
Suggestions, comments..
Thanks,
Walt