scsh-users
[Top] [All Lists]

Re: read-string/partial

To: scsh-news@zurich.ai.mit.edu
Subject: Re: read-string/partial
From: stktrc <stktrc@yahoo.com>
Date: Tue, 22 Apr 2003 19:47:20 +0200
Organization: News UmU SE
rthappe@web.de ("Rolf-Thomas Happe") writes:

> stktrc writes:
>> block until there is something to read.  But read-string/partial (with
>> nbytes > 0) on an (TCP) socket inport returns immediately with ""
>> (empty string, which I interpret as that no data was read).  It should
>> have blocked AFAICT.
>
> ... except if the inport was set to non-blocking i/o (or the reader 
> encountered eof).  The inport state can be checked with 
>
>     (bitwise-and open/non-blocking (fdes-status inport))) 

That's right.  I assumed (should have checked of course) that the
socket port would not be set non-blocking by default, but it seems
like it is.

<Prev in Thread] Current Thread [Next in Thread>