[drakma-devel] Re: [patch] drakma, support for connection-timeout on SBCL

Erik Huelsmann ehuels at gmail.com
Sun Dec 30 10:16:43 UTC 2007


On Dec 29, 2007 6:49 PM, Edi Weitz <edi at agharta.de> wrote:
> On Sat, 29 Dec 2007 16:32:48 +0100, Stanislaw Halik <sthalik at tehran.lain.pl> wrote:
>
> > I have implemented timeouts for non-LispWorks lisps. Latest usocket
> > trunk and working usocket:wait-for-input required.
> >
> > Patch attached.
>
> Ugh, does that mean usocket fully supports timeouts now?  I must have
> missed parts of the discussion.

I don't think you missed parts of the discussion: usocket supports
time-outs only in a way supported by select(). This means we can only
wait for the signal "there's input". This is different than the first
patch submitted in this thread which waits a certain amount of time
for a specified minimum amount of data.

When reading about the reason *why* he wants to implement timeouts is
not because he's getting incomplete data, but some servers are broken
and send no response at all (but still hang on to the connection!).
This use-case can be solved without any send/receive time-outs.

In order to be able to use the select() approach with Drakma,
Stanislaw implemented a stream which waits for *some* data to become
available within the specified timeout period. If it does not happen,
it raises an error, if it does, it just reads the data from the
network and returns it to Drakma.

> Still, I'd rather wait until there's an official usocket release, so
> people who install Drakma can use ASDF-INSTALL if they want.

That'd be my preferred approach too. (Although testing trunk code is
highly appreciated, ofcourse!) I have found in the past it's hard to
manage a project which has dependencies on non-released code, if you
don't own the dependency project too.

bye,


Erik.
PS: I think Stanislaw can use his patch and usocket trunk without
problems, it's just that I'd prefer not to have projects depend on
unreleased usocket code - yet.



More information about the Drakma-devel mailing list