What were your intentions for terminating the I/O? You can terminate on a fixed number of chars being received, or a specific char, or char by char, or by timeout. Note also the problem of reading "cr" vs "crlf" records across *NIX and Windows, as this has bitten me before. That immediate buffer flush mentioned above has also worked well, situation depending.
Praise the Camel,
Diskcrash
In reply to Re: Buffer, buffering my problem
by diskcrash
in thread Buffer, buffering my problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |