running WebResquest() on two URLs? at same time

 

Is it possible to running WebResquest() on two URLs? at same time?How?

 
mahmood0:

Is it possible to running WebResquest() on two URLs? at same time?How?

I doubt you can do anything at the same time (in MQL). Moreover, the built in webrequest is synchronous, so it stops the script until it receives a response or time out. If you need to trigger two concurrent requests, you have to use wininet with asynchronous request handling. It is not quite straightforward, but it works (and it may be used in indicators without a risk of blocking the thread).

 
Ovo Cz:

I doubt you can do anything at the same time (in MQL). Moreover, the built in webrequest is synchronous, so it stops the script until it receives a response or time out. If you need to trigger two concurrent requests, you have to use wininet with asynchronous request handling. It is not quite straightforward, but it works (and it may be used in indicators without a risk of blocking the thread).

Thanks 
 
mahmood0:

Is it possible to running WebResquest() on two URLs? at same time?How?

WebRequest is synchronous operation and can be running only in series (two and more).