[usocket-devel] Re: Proposed wait-for-input API for waiting for input for (one out of) a list of sockets

Erik Huelsmann ehuels at gmail.com
Mon May 21 12:53:13 UTC 2007


On 5/9/07, Erik Huelsmann <ehuels at gmail.com> wrote:
> I've come to the conclusion that in order to be able to use sockets,
> even in the blocking mode which usocket supports now, we need an API
> to wait for one or more sockets to become ready for input (or accept()
> in case of server sockets). If this call would support time-outs, that
> would be even better.
>
> So, I've investigated all supported implementations and -apart from
> LispWorks- they all support a
> 'wait-for-input-on-one-or-more-sockets-with-timeout' api. (I've sent
> LispWorks tech support a mail about this, hoping they actually do
> provide a function to achieve this.)
>
> As for the API which I think I'll be able to support on all platforms,
> it'll look like this:
>
> (defmethod wait-for-input (stream-or-streams &key timeout))
>   => (values ready-streams time-remaining-within-timeout)

I've implemented this API in the past 2 weeks for all supported
implementations except;

- ArmedBear (work in progress)
- SBCL Win32
- LispWorks Win32

I'd love any testing and either confirmation of correctness or problem
reports. I haven't implemented automated testing yet.


Thanks for any feedback!

bye,

Erik.



More information about the usocket-devel mailing list