RnDMonkey Posted September 19, 2013 Report Share Posted September 19, 2013 (edited) I've got a stream reader endpoint, and I'm trying to avoid waiting for a timeout from the reader endpoint creation. Do you have to wait until the writer end is created before you can create the reader end? The LabVIEW help says that both are needed, obviously, but doesn't explicitly state precedence or a requirement that they be created at the same time. Never mind. I see from reading http://www.ni.com/white-paper/12267/en that "The endpoint that is created first will wait until the other endpoint has been created and is ready to connect, at which point both create functions will exit. The stream is then ready to transfer data. Used in this manner, the create function effectively acts as a network rendezvous where neither create function will progress until both sides of the stream are ready or until the create call times out." This raises a different question, now. If these endpoint attempts are preventing my program from exiting, is it possible to force them to stop before their timeout? Perhaps I'll just put them in loops with short timeouts and made the loops aware of my exit conditions. Ryan R. Edited September 19, 2013 by RnDMonkey Quote Link to comment
Ryan Podsim Posted September 19, 2013 Report Share Posted September 19, 2013 One option would be to set the timeout to something that works for your app, 100ms, 10 sec. Then if the create times out then you can check other conditions, stop for instance, then loop back and try the create again. Quote Link to comment
RnDMonkey Posted September 19, 2013 Author Report Share Posted September 19, 2013 Thanks again, Ryan. This is exactly what I decided on and just finished testing. I set a 10 second timeout and use an error case for the code after. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.