Re: [vwnc] HttpClient timeout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] HttpClient timeout

Maarten Mostert-2
Hoi Jan and  Sudhakar,

I think my problem actually came from not loading the NetconfigTool.

Once I loaded this package the NetClient responds correctly to its accessors
like timeout keepalive etc.

I did not yet manage to autodetect the proxy parameters to have my program
search for updates behind proxy servers.

Don't know if that is really possible ?

Regards,

@+Maarten,


----- Original Message -----
From: "Jan Weerts" <[hidden email]>
To: "Maarten MOSTERT" <[hidden email]>
Sent: Friday, September 19, 2008 9:47 AM
Subject: RE: [vwnc] HttpClient timeout


> Hi Maarten!
>
> Maarten MOSTERT wrote:
>> I am playing around with the HttpClient and have some questions.
>>
>> First of all I am trying to set the default timeout to something
>> shorter then 20 seconds with the following code:
>>
>>     httpClient := Net.HttpClient new.
>>     httpClient timeout: 2000.
>>     request := Net.HttpRequest get:
>>
>>     'http://stakepoint.com/files/support/stakepointupdate137.cfgx'.
>>         response := [httpClient executeRequest: request] on: Error
>>         do: [:exc | ^false].
>>
>> Now inside request I do observe the clientPI timeout to be 2000
>> milliseconds however this seems totally ignored as the requests still
>> takes over 20 seconds to execute.
>>
>> The second question is wheter there is a smart way to know wheter I
>> should try to connect through a proxy other then by trial and error
>> (the above).
>
> I know your post is some days old, but I did not see any answer
> and don't know, if you have found a solution.
>
> I had a similar problem, which in the end resulted from still having
> the actuall httpclient object around. These seem to copy the timeout
> from the global setting on initialization. What I had to do, was
> set the global timeout and look for the client and set its timeout
> too. This works at least under vw7.4.1.
>
> Best
>  Jan
>


--------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 270.7.0/1681 - Release Date: 19/09/2008
15:54


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc