Nadav,
There is no direct way of flushing a TCP buffer in general. Please
refer to the following discussion post on codeguru for more information
on this:
http://www.codeguru.com/forum/showthread.php?p=1618669#post1618669
However, if you do wish to read smaller chunks of data, then you can
disable Nagle's Algorithm for your TCP connection. Please refer to the
following link for more information on disabling Nagle's algorithm:
http://digital.ni.com/public.nsf/websearch/7EFCA5D83B59DFDC86256D60007F5839?OpenDocument
Another way of flushing the TCP buffer would be to close the
connection. However, I am not sure if that would be helpful in case of
a telnet application.
I hope this helps!
Mehak D.