- From: Henrik Frystyk Nielsen <frystyk@w3.org>
- Date: Sun, 29 Nov 1998 16:49:43 -0500
- To: www-lib@w3.org
- To: FOREST <laurent.forest@grenoble.sema.fr>
FOREST wrote: > > A colleague and I are currently implementing a simple Web client using libwww. This client manages simple HTTP requests to Web servers. > > How are the following time-outs manages by libwww: > - HTTP connection time-out ? > - Request time-out ? > > In other words : > 1) Connection time-out > ------------------------ > 1.1) what happens if a connection time-out occurs? I guess an error (905 CONNECTION TIMEOUT) is added in the error stack of the Request which initiated the connection. Right or wrong? Yes, that's right. The current request and all pending requests for that host are all timed out (status code is HT_CONNECTION_TIMEOUT) > 1.2) where are these time-outs managed? > 1.3) how can the connection time-out value be set? You can find more information about timers and other libwww classes in the User's guide at http://www.w3.org/Library/User/Using/ There are several timeouts that can be set in libwww: 1) The time we keep an idle persistent connection open. Here there are in fact two mechanisms depending on whether you use blocking or non blocking sockets. The default is 60 secs. The timers can be accessed using the functions described at http://www.w3.org/Library/src/HTHost.html#Persistent 2) The idle time we want to wait when receiving a response from a server, that is, if it doesn't send anything in a number of secs. The default here is no timeout. It can be set in http://www.w3.org/Library/src/HTHost.html#RequestTimeout 3) The timeout before we flush pending requests in a pipeline, the default here is 30 ms. It can be set at http://www.w3.org/Library/src/HTHost.html#Delayed 4) The timeout before we start sending the body of a PUT or POST request. Normally we send the Expect: 100-continue header field but if the server doesn't send back a 100 Continue code then we upload the body anyway. The default is 2 secs and can be set here: http://www.w3.org/Library/src/HTTP.html Henrik
Received on Sunday, 29 November 1998 16:50:02 UTC