I’m using the WiFly library to connect my WiFly shield to our WLAN and it’s very successful.
However, attempting to connect to a local server using the library’s Client object flags up some issues. The following method attempts to connect to a Servlet that outputs a Unix timestamp that the method should read back in (along with the HTTP headers that we aren’t too interested in). The form we are expecting is T=xxx.
You are only sending one carriage and line feed “\r\n” to the http server (assuming since the port is 8080 as opposed to 80, and your using http protocol) so the server is waiting for the next header line which it never gets, so it doesnt respond (also assuming this is a standard webserver which waits for an empty line, and not a custom one that is expecting only one line) So just modify that line to:
You are only sending one carriage and line feed “\r\n” to the http server (assuming since the port is 8080 as opposed to 80, and your using http protocol) so the server is waiting for the next header line which it never gets, so it doesnt respond (also assuming this is a standard webserver which waits for an empty line, and not a custom one that is expecting only one line) So just modify that line to:
I can see why that extra line is important (it’s a Tomcat server btw hence the port number). However, the server was actually responding to the singular return.