LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP_Disconnect event

I am using tcp library. Wen I shut down my server, how do I know in my CVI
client app, that this has happened. I don't get tcp_disconnect event.


vishi
0 Kudos
Message 1 of 5
(4,042 Views)
I haven't seen the behavior you describe; everytime I shutdown the server I get a tcp_disconnect event on the client side. Are you calling UnregisterTCPServer to shutdown the TCP server? Is the returned status negative (error)?

Regards,
Azucena
0 Kudos
Message 2 of 5
(4,042 Views)
No, server is running on some custom hardware, so I just shut down power to
that. I want to detect that if it happens.


vishi

"aperez" wrote in message
news:506500000005000000F1D50000-1042324653000@exchange.ni.com...
> I haven't seen the behavior you describe; everytime I shutdown the
> server I get a tcp_disconnect event on the client side. Are you
> calling UnregisterTCPServer to shutdown the TCP server? Is the
> returned status negative (error)?
>
> Regards,
> Azucena
0 Kudos
Message 3 of 5
(4,042 Views)
One option would be to create a Timer Callback function and inside this callback, call the InetPing() function to ping the server and see if it is available or not.
Manooch H.
National Instruments
0 Kudos
Message 4 of 5
(3,751 Views)

I have same type of setup and when power is remover, i get a TCP disconnect.

Are you doing ProcessSystemEvents or ProcessTCPevents while you wait ?

 

- Make Software User Friendly -
0 Kudos
Message 5 of 5
(3,661 Views)