Posted: Sat May 06, 2006 3:11 pm Post subject: TCPRead
Please help!
I am using TCPRead and am having problems with it just hanging. More specifically it does exactly what the documentation says it will do and I do not understand it.
"When there are not enough bytes in the reception buffer, the routine will wait until there is enough data or the socket is closed." BASCOM-AVR Help.
So what is it waiting for and what can I do to fix it.
I am trying to use the POST from a web page to send me data. I have it working but I have to hit ESC key on the browser to close the socket before the TCPRead will continue.
The following code would site at the Tempw = TCPread(i,S) and wait for the socket to close.
Do
If S = "" Then
Done = 1
End If
Tempw = Tcpread(i , S)
#if Debug
Print S
#endif
Loop Until Done = 1
I found out that I had changed the following server reply message:
HTTP/1.0 200 OK{013}{010} to
HTTP/1.1 200 OK{013}{010}
The HTTP/1.1 causes the TCPread message to wait and the HTTP/1.0 does not.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum