in reply to Re^3: Sockets, autoflush, and TCP_NODELAY
in thread Sockets, autoflush, and TCP_NODELAY
Given that the overall rate of production under normal conditions is only about 1 unit per 2-3 seconds, I had tempered the scanner to transmit the data once and only once for a unit when I first noticed the problem. Even with this huge delay (to a computer anyways), I can still see an odd packet here and there that has more than one read in it.
As I mentioned earlier, I made the situation worse by increasing the transmit rate on the scanner. I did this by enabling an additional barcode format to be read and so now the scanner reads between two barcodes over and over quite quickly. This confirms for me that somewhere along the line my TX data is getting buffered somewhere. Knowing we all get stupid sometimes, I went in and added some prints to make *sure* that I'm only sending one complete scanner read per call to send(), or syswrite(). -- I've been flip-flopping between them to see which behaves better; neither so far.
2. As follows:
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Sockets, autoflush, and TCP_NODELAY
by BrowserUk (Patriarch) on Apr 21, 2009 at 17:50 UTC |