c# - How can I make a WebProxy Timeout? -


i downloading string via system.net.webclient

i downloading using proxy:

 dim proxy new net.webproxy(grabbedproxy.tostring)      webclient.proxy = proxy 

my basic problem have no idea how make downloadstring request timeout after amoun of time. if proxy being used slow makes program hang minutes. there way set timeout time proxy dissconnect after amount of seconds?

using webclient.downloadfileasync() allows use cancelasync() timer using own timeout value.

check post, shows how implement derived class timeout:

set timeout webclient.downloadfile()


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

javascript - Backbone.js getting target attribute -

html - Repeat image to extend header to fill screen -