From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MAKE TWO HTTP REQUESTS IN PARALLEL FOR TWO DIFFERENT IP ADREESES.

0 Kudos
Message 11 of 14
(1,645 Views)

Ok, I agree that at the hardware level, you can only make one request at a time. However, the TCP/Networking stack allows for multiple connections to be opened/maintained at the same time (hundreds of connections?) - and when making a HTTP request there is a period of time while the network is inactive waiting for the server to respond so you can use that time to make another request. A lot of web servers can also handle multiple simultaneous incoming connections.

 

I think in this case the boolean coming into the while loop comes from the output of the bottom GET request which makes them run one after another. You need to remove this dependency (the boolean wire coming in at the bottom). You could also consider having your loops run in parallel, rather than nesting them one inside the other.

 

Also, according to the help files, you don't need to create/close the client handle unless you need custom headers or login credentials for the request.

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 12 of 14
(1,592 Views)

thanks but how I can make multiple GET requests to the TCP / IP protocol?

0 Kudos
Message 13 of 14
(1,544 Views)

@DanyckV wrote:

thanks but how I can make multiple GET requests to the TCP / IP protocol?


run them in parallel.

0 Kudos
Message 14 of 14
(1,533 Views)