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?
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.