LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clear TCPIP buffer

Hi all
 
I'm working with Telnet  protocol.
 
I need some times to clear buffer. But there is not such function in LabVIEW, so i made it by reading data, but the problem that when there is huge amount of data in buffer, reading can take very long time.
 
Any ideas how to clear without reading the data?
 
Thanks, Nadav
0 Kudos
Message 1 of 2
(4,065 Views)
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.
0 Kudos
Message 2 of 2
(4,038 Views)