LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a blocking TCP read/write?

I need a blocking read on the tcp socket because i do not want to use the TCP callback. With the ClientTCPRead i cannot set infinite timeout.

Anyone could help me please?

 

Thanks in advice!

0 Kudos
Message 1 of 3
(3,358 Views)

You can write your BlockingReadTCP function by calling ClientTCPRead (with finite timeout) in a loop.

 

This way you also get the ability-to-abort as a bonus. Just check the value of an abort flag within the loop and read again.

 

Does not that suit your needs? 

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 3
(3,340 Views)

This could be a solution, thank you!

0 Kudos
Message 3 of 3
(3,335 Views)