Download MetaTrader 5

running WebResquest() on two URLs? at same time

To add comments, please log in or register
Mahmoud Farajpour
285
Mahmoud Farajpour 2016.01.13 09:24 

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

Ex Ovo Omnia
3185
Ex Ovo Omnia 2016.01.13 10:01  
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).

Mahmoud Farajpour
285
Mahmoud Farajpour 2016.01.13 21:36  
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 
Alexey Volchanskiy
17136
Alexey Volchanskiy 2016.01.14 01:18  
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).
To add comments, please log in or register