Since there is no timeout for responce in windows phone xna version of WebClient i need to implement one. The idea is to make MyWebClient
derived class from WebClient
with timer. But i got stuck on it.
Is there any way to implement timer here without using Update
for every instance of MyWebClient
so that i can use it like WebClient
?
Tell me more
×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.
What about using a DispatcherTimer ? You could start the timer with your timeout a Interval value and register a tick event. When the event fires you throw a exception for a timeout (or do whatever pleases you). You could even hook up the DownloadProgressChanged event of the webclient and reset the timer or smth. like this. | |||||||||
|
Problem solved by using static varible
And then in
I dont find this solution clean but anyway it solves the problem. | |||
|