LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network stream timeout

Hi all,

 

I'm using network streams to do some communication and have noticed what I think is strange behaviour.

 

Specifically I'm using the Create Network Stream Reader/Writer Endpoint functions. At the moment I'm only working on the host side so the streams aren't communicating, i'm expecting the network streams to error out (being unable to establish a connection). They do error out, but the time in which they do so seems to be disconnected from the timeout parameter I am setting.

 

Here is a quick (rough) summary of timeout values against execution times for the function:

 

Timeout (ms) - Execution (S)

 

1000 - 6.5

2000 - 6.5

5000 - 6.5

10000 - 10.1

500 - 6.5

5 - 6.5

2 - 6.5

1 - 13

 

I'm guessing that the way the function is implemented is limiting what the lower value for a timeout can be? Is there anyway to make this quicker as I would like to wait no longer than 1 to 2 seconds before it stops trying. Also, can anyone explain why going from a 2ms timeout to 1ms timeout is doubling the execution time?

 

Thanks for your help/insight,

 

Olly

**********************************************************************************************
The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.
0 Kudos
Message 1 of 5
(3,119 Views)

Hi Olly.

 

 

I cannot recreate the behavior you are seeing.

 

I just tried to run the shipping example called "Simple Network Streams".

I have played around with the timeout settings for both Reader and Writer endpoint, and any value from 1ms to 10s is working as expected.

 

What version of LabVIEW are you using?

How have you measured the time before timing out?

Can you try to open the shipping example and add the timeout parameter to this VI.

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 2 of 5
(3,108 Views)

As per Alex's reply, I don't see any problem with this either building from the ground up or in any of my existing applications / VIs that use Network Streams, where I take advantage of the timeout feature.

 

Are you running the Create... VIs within other code? If you run with execution highlighting, is it actually this VI that is taking the long period of time to timeout? It feels like there's something else happening in the background.

---
CLA
0 Kudos
Message 3 of 5
(3,098 Views)

Hi guys,

 

(forgot my password to above account and no longer have access to the email so created a new one!)

 

Thanks for the replies. I had a quick play around with the Simple Network Streams example and managed to track the problem down. If you specify an invalid host (try mistyping localhost as locahost or something) you should see it replicate the behaviour I described (timing out in around 6.5 seconds on my machine even when a much lower timeout is specified). Simple fix in the end and now all is working as it should. Thanks again

 

Olly

0 Kudos
Message 4 of 5
(3,057 Views)

Hi Olly85 and everybody is reading,

Long time is past however I would like to know how to solve the issue generated on timeout of the create endpoint VI.
My VI run two Network stream endopint (writer and reader) as a client (it attempts to open connection everytime the timeout is reached). The VI is reentrant, the first instance respects the timeout as expected, the second instance does not wait the timeout.
Why do I see this behaviour?

 

0 Kudos
Message 5 of 5
(2,754 Views)