i am using Qnetworkaccessmanager to get data from httpserver when server is not on how can check not connected it is taking time for 30sec to timeout i want to reduce 30sec to 10sec how i can check ...can anybody give the solution.....
i am using Qnetworkaccessmanager to get data from httpserver when server is not on how can check not connected it is taking time for 30sec to timeout i want to reduce 30sec to 10sec how i can check ...can anybody give the solution.....
The only way to check if a server is reachable is to try to connect to it.
If you want to cancel the operation before itself can finish based on a timeout, just create a timer with that timeout and connect it to the network reply's abort() slot.
Also connect the downloadProgress signal of the reply to the timer's stop() slot to cancel the timer when data arrives.
Cheers,
_
no downloading just dispaly data
timeout handling for displaying data
Well, same thing really.
Start a timer, restart it when data arrives, act on it timing out.
Cheers,
_
Bookmarks