Monitoring a TCP connection

Monitoring a TCP connection

Post by decke » Tue, 20 May 2008 03:30:26


Hello folks,

I have a VI that monitors a TCP connection using the function "Not a
Number/Path/Refnum". When the peer (the other side which this VI is
connected is a win program in Visual Basic) closes the connection, my
VI seems unable to detect the closed connection, it is "thinking" that
the TCP refnum is still valid.
How I can handle it?

Thanks!
 
 
 

Monitoring a TCP connection

Post by MikeS8 » Tue, 20 May 2008 04:10:05

Hi giseli, how did you check it? Normally you get an error if the connection fails. Can you upload your vi?MikeMessage Edited by MikeS81 on 05-18-2008 08:50 PM

 
 
 

Monitoring a TCP connection

Post by andre.buur » Tue, 20 May 2008 20:40:10

Monitor the error cluster instead of the refnum. th refnum is a local handle that has nothing to do with the actual link. It's just a pointer to the link object. The error cluster holds the information you want to monitor.
 
 
 

Monitoring a TCP connection

Post by smercurio_ » Wed, 21 May 2008 01:10:09

Specifically, you will probably want to see when you get error code 66, " The network connection was closed by the peer".