LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop the tcplisten. vi called by a sub vi

In my application I'm calling a subVI (pop up) that use the TCPListen.vi to listen to a specific port. This subVI executes the communication function well and then exit  to return to the main application loop. But at this moment the client are reconnecting automatically  to the TCPListen server. The client should no reconnect to the server (the client reconnect timeout cannot be changed).
I checked with the "TCPview" program from www.sysinternal.com and confirm that the TCPlisten server is still active on the system when I end the subVI application... I can end this server task only when I end the main labview application.

Is there any method to "kill" or "stop"  the  server  application subVI  without  leaving my main program ....

Thanks for advice

Regards

HaemoPhil
Download All
0 Kudos
Message 1 of 2
(2,572 Views)


@HaemoPhil wrote:
In my application I'm calling a subVI (pop up) that use the TCPListen.vi to listen to a specific port. This subVI executes the communication function well and then exit  to return to the main application loop. But at this moment the client are reconnecting automatically  to the TCPListen server. The client should no reconnect to the server (the client reconnect timeout cannot be changed).
I checked with the "TCPview" program from www.sysinternal.com and confirm that the TCPlisten server is still active on the system when I end the subVI application... I can end this server task only when I end the main labview application.

Is there any method to "kill" or "stop"  the  server  application subVI  without  leaving my main program ....


You will want to close the Listen network reference too. The TCP Listen.vi is a high level VI that does everything conviniently in one VI but it does not close the server socket at all. What I would do instead is using the TCP Create Listener and TCP Wait on Listener nodes directly. AFTER you are done with the server, close the "listener ID" that you got from TCP Create Listener and have used in the TCP Wait on Listener node by wiring it to TCP Close.

Rolf Kalbermatter

Message Edited by rolfk on 04-26-2006 12:17 PM

Rolf Kalbermatter
My Blog
Message 2 of 2
(2,562 Views)