07-08-2015 10:37 AM
@ssnp wrote:
it was a wrong wiring.
thanks for help to all of you
One question is still in my mind how long I can expect the TCP connection is valid. It is till the TCP reference is close and can use same connection in my other vi. If yes then how
Ben's famous Action Engine Nugget is always a good read.
You are completely missing the greatest feature of an action engine. It provides a SINGLE point where ALL actions on a given resource must go through. You really want to avoid attempting to access that TCP connection without going through the action engine.
07-08-2015 10:56 AM
Jeff is correct. Any communications through this port should go through this Action Engine/library.
But one thing to be aware of with TCP/IP. Windows likes to auto close ports that are not being used. So you will need to make sure you are constantly sending and receiving data. By constantly, I mean do a ping message every 30 seconds or so.
07-08-2015 02:52 PM
It is not just Windows that will auto close ports. RFC793 specifies a per device "user timeout" that causes all devices to close a port.
"USER TIMEOUT
For any state if the user timeout expires, flush all queues, signal
the user "error: connection aborted due to user timeout" in general
and for any outstanding calls, delete the TCB, enter the CLOSED
state and return."
A proposed change is in the works; TCP User Timeout Option (RFC5482) that would help the situation but it has not been approved.
Kind regards,
Rick