[usocket-devel] Polling Connection Socket
Erik Huelsmann
ehuels at gmail.com
Sun Dec 23 14:12:44 UTC 2007
On Dec 22, 2007 9:36 PM, Volkan YAZICI <yazicivo at ttmail.com> wrote:
> Hi,
>
> There are lots of messages dropping to comp.lang.lisp and #lisp @
> irc.freenode.net about how to poll a connection socket. One common
> advice is to implement it on top of READ-CHAR-NO-HANG with
> timers. Would anybody consider contributing such a socket polling
> facility to usocket library? It might not be totally portable across
> all lisp implementations in the wide, but will probably run on major
> ones. This will be better than not having any. Any ideas?
Yes! Thanks for mailing. As a matter of fact, the function you
describe exists in the usocket trunk code: that contains a function
'wait-for-input-available' which polls several streams for available
input at once and allows a time-out to be set.
The facility is even completely portable, with the exception that the
following implementations aren't implemented yet:
- SBCL, Win32
- LispWorks, Win32
The feature could use intensive testing and generally 'heavy' use. The
interface isn't guaranteed to stay the same, but in case it changes,
the changes will be announced here and won't be far off what it's now.
The reason the code hasn't been released in an official release is
exactly the reason it's not (yet) implemented on SBCL and LispWorks in
their Win32 incarnations...
So, if you could promote the code, have people test it and send their
feedback to this list, we're more likely to see a new usocket release
with this support soon. (Subscription to the list is not required, but
non-member posts are subject to moderation.)
I hope that helps!
bye,
Erik.
More information about the usocket-devel
mailing list