From: Seth Kurtzberg Date: 2003-03-03T02:38:22+09:00 Subject: Re: Unable to do non-blocking read on socket I've coded a workaround for this. It is a bit of a hack but appears to work. I will post it later today. On Sunday 02 March 2003 10:31 am, Mauricio Fern�ndez wrote: > On Mon, Mar 03, 2003 at 02:04:21AM +0900, Yukihiro Matsumoto wrote: > > Hi, > > > > In message "Re: Unable to do non-blocking read on socket" > > > > on 03/03/03, Seth Kurtzberg writes: > > |Also, the blocking behavior only occurs when the maximum read size > > | argument is supplied to the read() call. > > > > IO#read without maximum size is supposed to read _all_ data from the > > port, so that it should naturally block. > > What would be the way to read all the data currently available, without > blocking (waiting for more)? > > The only solution I can thing of without using #sysread is using select and > reading only one byte at a time, then repeating until there's nothing > left, but this is so sloow... -- Seth Kurtzberg M. I. S. Corp. 480-661-1849 seth@cql.com