Jump due to timeout in response - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: Jump due to timeout in response (/showthread.php?tid=1753) |
Jump due to timeout in response - JuanjoGomez - 06-14-2023 HI, I have a problem. When I enter my program, the first thing I do is find out what my external IP is. For that I use a function that I saw from another programmer. The problem is that depending on the computer, connection, times you enter the program......, sometimes it does it instantly and sometimes it takes a long time to get it (1 minute or more). Can anyone think of how to set a timer so that if it hasn't responded in, say, 3 seconds, then program continues at another line? or by presing a key if is more easy? Tanks Code: (Select All)
RE: Jump due to timeout in response - Ultraman - 06-14-2023 Hi, Juanjo! I remember making that code a long, long time ago! Unfortunately, due to how it is written, it does not have a way to interrupt the download. You'd have to use a different method. Thankfully, that's very possible! Here is some other code I wrote on here that can be adapted to replace the internet communication portion of the API and also get rid of the need for creating a file and then killing it! NEW NEW URL Downloader (All Platforms!) (qb64phoenix.com) If I have time, I can help you adapt my other internet code to work with the API. RE: Jump due to timeout in response - JuanjoGomez - 06-14-2023 (06-14-2023, 12:56 PM)ultraman Wrote: ¡Hola, Juanjo! ¡Recuerdo haber hecho ese código hace mucho, mucho tiempo! Desafortunadamente, debido a cómo está escrito, no tiene forma de interrumpir la descarga. Tendrías que usar otro método. ¡Afortunadamente, eso es muy posible! Hi, Thank you so much. I will try that new code |