This one bug has been haunting me since I got the TCP communication working and I wondering if any one had any bright ideas on how to fix.
Should work like this...
- I send the "REFRESH\r\n" then read incoming stream buffer.
- Clear out all built up buffer data to get to the returned "REFRESH\r\n" text.
- Read 1188 byte packet and display info.
- Update loop runs once a second to check the buffer.
Instead it does this...
- I send the "REFRESH\r\n" then read incoming stream buffer.
- Clear out all built up buffer data and do not find the "REFRESH\r\n" anywhere in it.
- The refresh packet is dumped out as ASCII on update loop.
I'm only assuming that the buffer is completely cleared out before the refresh packet could be sent back. So does anyone know a efficient way to pause for a second? At this point I can disable the update while the refresh method is running. I have it stop checking the buffer when nothing is found.
I do not want to....
- Include the REFRESH method in the update check.
- Do a pointless loop just to waist time.
Should work like this...
- I send the "REFRESH\r\n" then read incoming stream buffer.
- Clear out all built up buffer data to get to the returned "REFRESH\r\n" text.
- Read 1188 byte packet and display info.
- Update loop runs once a second to check the buffer.
Instead it does this...
- I send the "REFRESH\r\n" then read incoming stream buffer.
- Clear out all built up buffer data and do not find the "REFRESH\r\n" anywhere in it.
- The refresh packet is dumped out as ASCII on update loop.
I'm only assuming that the buffer is completely cleared out before the refresh packet could be sent back. So does anyone know a efficient way to pause for a second? At this point I can disable the update while the refresh method is running. I have it stop checking the buffer when nothing is found.
I do not want to....
- Include the REFRESH method in the update check.
- Do a pointless loop just to waist time.