There's no guarantee that there's data available to read when entering the loop.
Code: --- |
---|
``` void loopcolor=#000000[/color] { |
while color=#000000[/color] { |
// if there are incoming bytes available |
// from the server, read them and print them: |
if color=#000000[/color] { |
char c = client.readcolor=#000000[/color]; |
Serial.printcolor=#000000[/color]; |
} |
} |
Serial.printlncolor=#000000[/color]; |
Serial.printlncolor=#000000[/color]; |
client.stopcolor=#000000[/color]; |
// do nothing forevermore:
while color=#000000[/color];
}
```
|
You'll probably have to add a "Connection: close" header in your request.