LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know when theres no Net connection?

Im using the TCP/IP library of CVI to connect several computers, but when there´s no fisical net connection or when it is lost because of hardware failure or net cable deattach my programs hangs a lot to wait for the timeout, so i need to know how I can check for fisical access to a network before try to comunicate to other computer?
Thanks
0 Kudos
Message 1 of 2
(2,863 Views)
Hi!
You can use the callback function, and see which event called the callback function. xType parameter specifies the event type, so in your case statement within the callback function, you can check if xType equals TCP_DISCONNECT.

Mika Fukuchi
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,863 Views)