LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring a TCP connection

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!
0 Kudos
Message 1 of 4
(2,902 Views)
Hi giseli,
how did you check it? Normally you get an error if the connection fails. Can you upload your vi?

Mike

Message Edited by MikeS81 on 05-18-2008 08:50 PM
0 Kudos
Message 2 of 4
(2,901 Views)
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.
Regards,
André (CLA, CLED)
0 Kudos
Message 3 of 4
(2,868 Views)
Specifically, you will probably want to see when you get error code 66, " The network connection was closed by the peer".
0 Kudos
Message 4 of 4
(2,855 Views)