Alaska Software Inc. - loadfreomurl() hangs
Username: Password:
AuthorTopic: loadfreomurl() hangs
Stephan Koenigloadfreomurl() hangs
on Sat, 11 Nov 2006 07:47:18 -0500
Hi,

in different Environments (W2000 and XP) I have often problems with
loadfromurl() hang-ups.

I work trough proxies and the connection is not stable (and never will be)
but MANY times the loadfromurl() does hang and not timeout.

Any hints on how to solve that ?

Thanks

Stephan
Frans VermeulenRe: loadfreomurl() hangs
on Mon, 13 Nov 2006 09:30:33 +0100
Stephan,

> in different Environments (W2000 and XP) I have often problems with
> loadfromurl() hang-ups.
>
> I work trough proxies and the connection is not stable (and never will be)
> but MANY times the loadfromurl() does hang and not timeout.
>
> Any hints on how to solve that ?

Errr, solve....

Start LoadFromUrl from a Thread, by doing that you can assure your main
program keeps running. Your program has to be restarted every once and
a while, because of the hanging threads. You can have well over 1000
running threads without problem.

HTH,
Frans Vermeulen
Stephan KoenigRe: loadfreomurl() hangs
on Tue, 14 Nov 2006 07:42:56 -0500
Thanks Franz.

I am doing it like this now and it works fine.

Is this a windows or XPP Bug ?
Frans VermeulenRe: loadfreomurl() hangs
on Wed, 15 Nov 2006 12:51:35 +0100
Stephan,

> Is this a windows or XPP Bug ?

I think this is "by design".
LoadfromUrl uses its socket in blocking mode.
This means it keeps waiting until the data is complete.

Before AsiNet became part of Xbase++, I had my own
"LoadFromUrl", using a socket in non-blocking mode,
emulating blocking mode, having a time-out. The problem
I had with it, was that I never could be sure my data was
complete.

It is either being bitten by the dog or by the cat.
Blame Bill 

Regards,
Frans Vermeulen