Re: server down error status.

Well, I am getting pretty puzzled by this behavior. I had tried the samples 
that come with the project, and again did so, and no matter which terminate 
handler or timeout I set, any programs gets stuck as ..

HTDoConnect. WOULD BLOCK `w0352496'
Host Event.. WRITE passed to 
`http://w0352496:9080/sampleserv/servletsample2'
HTDoConnect. WOULD BLOCK `w0352496'
Host Event.. WRITE passed to 
`http://w0352496:9080/sampleserv/servletsample2'
HTDoConnect. WOULD BLOCK `w0352496'

In this case there is NO webserver runnning on w0352496:9080 (which happens 
to be my own NT machine). Does anyone have a solution to exiting gracefully 
when there is no web server running on a valid host.

Also, say if I try to connect to a non-existant machine, the program does 
exit.

Thanks,
Tanmay


-----------------------
Tanmay Patwardhan
Applications Developer,
UBS Warburg,
Chicago, IL.
-----------------------





>From: Timothee Besset <ttimo@idsoftware.com>
>To: www-lib@w3.org
>Subject: Re: server down error status.
>Date: Mon, 27 Jan 2003 17:22:20 +0100
>
>
>Have you tried the examples provided on the website? There is a test
>application that will fetch an URL and print it to screen. I believe it
>does handle the timeout situation fine.
>
>My apps are working fine in timeout situations also, I highly doubt this
>is a bug in libwww.
>
>regards
>
>On Mon, 27 Jan 2003 10:13:50 -0600
>"Tanmay Patwardhan" <tpthesis@hotmail.com> wrote:
>
> >
> > I did set a timeout, but it doesnt seem to affect anything. My program
> > still goes into an infinite loop in HTEventList_loop(request);
> >
> > I also do have a handler defined as indicated by Richard, but that too
> > doesnt get called in this case. Does libwww terminate gracefully on not
> > finding a webserver, or is this a bug ?
> >
> > Thanks,
> > Tanmay
> >
> >
> > -----------------------
> > Tanmay Patwardhan
> > Applications Developer,
> > UBS Warburg,
> > Chicago, IL.
> > -----------------------
> >
> >
> >
> >
> >
> > >From: Timothee Besset <ttimo@idsoftware.com>
> > >To: www-lib@w3.org
> > >Subject: Re: server down error status.
> > >Date: Fri, 24 Jan 2003 22:45:30 +0100
> > >
> > >
> > >I suppose you need to set a timeout?
> > >
> > >         /* Set the timeout for how long we are going to wait for a
> > >response */
> > >         HTHost_setEventTimeout(10000);
> > >
> > >regards
> > >
> > >TTimo
> > >
> > >On Fri, 24 Jan 2003 14:45:36 -0600
> > >"Tanmay Patwardhan" <tpthesis@hotmail.com> wrote:
> > >
> > > >
> > > > Hi all,
> > > >
> > > > I am observing some peculiar behaviour in my program using libwww.
> > > > When
> > >my
> > > > web server is running, but the URL is not available, I can catch
> > > > that
> > >error
> > > > through ((HTAnchor_header(HTRequest_anchor(request))==NULL).
> > > >
> > > > But, when the web server is not running at all, and I try to POST to
> > > > a
> > >URL,
> > > > then the status returned from status = HTPostAnchor(src, dst,
> > > > request)
> > >is 1
> > > > and libww goes into the following loop infinitely.
> > > > if (status == YES)
> > > > {
> > > > HTEventList_loop(request);
> > > > }
> > > >
> > > > Whats the best way to catch this error?
> > > >
> > > > Thanks and regards,
> > > > Tanmay
> > > >
> > > >
> > > >
> > > > -----------------------
> > > > Tanmay Patwardhan
> > > > Applications Developer,
> > > > UBS Warburg,
> > > > Chicago, IL.
> > > > -----------------------
> > > >
> > > >
> > > >
> > > >
> > > > _________________________________________________________________
> > > > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > > > http://join.msn.com/?page=features/featuredemail
> > > >
> > > >
> >
> >
> > _________________________________________________________________
> > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

Received on Tuesday, 28 January 2003 18:24:41 UTC