<
tibabenfortlapalanca@gmail.com> wrote:
> Hi Sven,
>
> so cool! Most of these things are actually the ones I need to test, so
> everything should be okay :)
>
> Thanks a lot!
>
> Bernat.
>
> 2012/9/18 Sven Van Caekenberghe <
sven@stfx.eu>
>>
>> Hi Bernat,
>>
>> On 18 Sep 2012, at 11:42, Bernat Romagosa <
tibabenfortlapalanca@gmail.com>
>> wrote:
>>
>> > For now I'll go with my implementation and wait for Sven's fix.
>>
>> I fixed that this morning with the following commit:
>>
>> ===
>> Name: Zinc-HTTP-SvenVanCaekenberghe.303
>> Author: SvenVanCaekenberghe
>> Time: 18 September 2012, 10:03:40 am
>> UUID: 9f5a3863-fc08-470d-b8a1-d44169952a66
>> Ancestors: Zinc-HTTP-SvenVanCaekenberghe.302
>>
>> Refactored ZnNetworkingUtils>>#socketStreamToUrlDirectly: to honor/use the
>> correct timeout both when doing a DNS lookup as well as during connect by
>> using NetNameResolver directly as well as using
>> #openConnectionToHost:port:timeout:
>> ===
>>
>> Something like this should work:
>>
>> [ [ (ZnClient new
>> �� �� �� �� beOneShot;
>> �� �� �� �� enforceHttpSuccess: true;
>> �� �� �� �� timeout: 1/10;
>> �� �� �� �� head: '
http://www.google.com') isNil ] on: Error do: [ false ] ]
>> timeToRun.
>>
>> But be careful, you are testing many things here:
>>
>> - that you have network access
>> - that the hostname resolves (you can also specify an IP address to skp
>> this)
>> - that the host is reachable (that you can connect to it)
>> - that it allows an HTTP connection
>> - that it aswers to HEAD /
>>
>> HTH,
>>
>> Sven
>>
>>
>> --
>> Sven Van Caekenberghe
>>
http://stfx.eu
>> Smalltalk is the Red Pill
>>
>>
>>
>>
>
>
>
> --
> Bernat Romagosa.