|
|
Home » U++ Library support » U++ MT-multithreading and servers » SOLVED HttpRequest: is it possible to not wait the server answer?
SOLVED HttpRequest: is it possible to not wait the server answer? [message #60084] |
Thu, 10 August 2023 13:49  |
 |
forlano
Messages: 1207 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
let me explain the title.
My U++ client perform 7 queries with an online mysql server through a direct connection. Because the data transfer lasted around 30 seconds I have had this (bad) idea. From my client I have extracted the queries (with data) and transformed them in a PHP file (around 70 kByte included the data to be inserted and updated).
This file was compressed and uploaded to the server via a HttpRequest file upload. On the server side the file is unzipped, echo "OK", and then performs the queries. All works, however my U++ client after done the file trasfer still continue to wait 30 seconds!
It seems that HttpRequest() finish its job only when the php procedure on the server terminated its work... even if the meanwhile the php script echoed some string this is shown only at the very end.
What I would like to do is return control to the user just after the file upload, without to wait the execution of the query. Is there some option in HttpRequest that permit me to do it? Can I gather the echoed string from the server and close the connection? (leaving the server continue its query?
I thought to use a thread. But it seems not to be the solution because after the data transfer the user is not aware of it and may quit the program in any moment.
Thanks in advance for any suggestion.
Luigi
[Updated on: Sat, 12 August 2023 12:12] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri May 09 11:51:11 CEST 2025
Total time taken to generate the page: 0.03360 seconds
|
|
|