The client.println() calls should not be sending single character packets.
:smile: Wireshark is your friend. Whatever println should do, here is what it is doing.
//This is the result of a println()
00000000 48 H
00000001 54 T
00000002 54 T
00000003 50 P
00000004 2f /
00000005 31 1
00000006 2e .
00000007 31 1
//And this is what a write() looks like
0000003F 3c 48 54 4d 4c 3e 0a 3c 48 45 41 44 3e 3c 6c 69 <HTML>.< HEAD><li
0000004F 6e 6b 20 72 65 6c 3d 22 73 74 79 6c 65 73 68 65 nk rel=" styleshe
0000005F 65 74 22 20 74 79 70 65 3d 22 74 65 78 74 2f 63 et" type ="text/c
0000006F 73 73 22 20 68 72 65 66 3d 22 64 65 66 63 73 73 ss" href ="defcss
0000007F 2e 63 73 73 22 3e 3c 2f 48 45 41 44 3e 0a 0a 3c .css"></ HEAD>..<
I will consider switching to HTTP/1.0 tho. That makes sense.
You would not be the first developer I had to try to explain HTTP version numbers to. Outside of HTTP, version numbers typically refer to compatibility. e.g. V2 may not be compatible with V1. HTTP was designed to be inherently backwards compatible. So a V1.1 request remains compatible with a V1.0 response. HTTP/1.0, infers fewer expectations. For instance, a server declaring a V1.0 response may still support pipelining but does not have to. A server declaring a HTTP/1.1 response, should support pipelining.
So you never show v1.1.0 on the wifi shield firmware?
An oversight, corrected. My shields are reporting V1.1.0 since the latest upgrade. The latest firmware version is the most stable and complete, in my opinion. People appear to be having issues upgrading and that appears to have created some myth and legend about earlier versions being better.
The latest firmware version still has issues though. The 2 second latency between transmit cycles being the most serious, in my view. http://mssystems.emscom.net/helpdesk/knowledgebase.php?article=51
I would love to have a crack at the WiFi shield's MCU firmware but would not know where to start with compiling and debugging.
edit: I tried you server. It works ok through the PuTTY test. It responds like zoomkat's code. It does not wait for the blank line, only the first line feed, and disregards the rest of the request.
My server is not really a server. It's a couple house spend on a proof of concept. The sketch started out as a simple client throughput test. I added just enough server code to send a response to a browser.
I gotta know how you are servicing more than one socket at a time.
I didn't know I was! This is the first time I have tried to do anything with the Ethernet shield and I am still trying to fathom the relationship between the library and the socket structures it is abstracting. To be honest, I would be more comfortable working directly with the sockets.
Would you be ok with posting your server code?
edit: Never mind. I just found out by testing mine. I just learned something about the w5100 and ethernet library.
My sketch will be in the next post but the server code is non-existent. Please do share what you know about the library.