Re: non-blocking socket accept

From: <>
Date: Fri, 28 Apr 95 09:50:47 +0200

> I'm not sure what R4RS says, but it seems appropriate to use
> (char-ready? (socket-input s)) to check and see if there is
> data ready. This would make port usage consistent.
> Would socket-out-ready? check to see if it's ready to accept
> output (e.g, that the buffer isn't full)? Maybe for symmetry
> socket-in-ready? would then make more sense than char-ready?.
> Then (socket-ready? s) would be used for the functionality
> peculiar to sockets -- i.e., there's a client waiting to
> make a connection. Since input/output ports aren't
> really defined at this point, maybe this makes
> more sense than using char-ready? here as well.
> My only concern would be ensuring that socket-ready? works on
> all the platforms that are supported. Otherwise, I think
> that this the miniumum functionality that should be supported.
> -Drew

My concern with proposing socket-in-ready?, socket-out-ready?
and socket-ready? was precisely to avoid using port. This
avoid a layer of indirection. Especially knowing that port are
buffered. Maybe it is not necessary, but my current patched socket
version doesn't detect all new character, which is very anoying,
and which I expect to avoid by providing a lower level interface
to the socket, or at least an interface as close as possible to
the socket itself.

I think, all unix platform will provide a way to tests sockets,
either with poll (moreless SV) or with select (moreless Bsd).

Furrer Marc 		    EPFL DI-LTI, 1015 Lausanne, Suisse      +41 21 693 29 07 / 66 00 (Fax)
You are a wise man my friend.
Not yet sir. But with your help, I am learning.
    -- Riker and Data, "The Measure of a Man", stardate 42523.7
Received on Fri Apr 28 1995 - 09:52:21 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST