From: matz@... (Yukihiro Matsumoto) Date: 2003-03-03T03:16:58+09:00 Subject: Re: Unable to do non-blocking read on socket Hi, In message "Re: Unable to do non-blocking read on socket" on 03/03/03, Seth Kurtzberg writes: |Yes, I know, but what I said is the reverse. It blocks when you _do_ supply |the maximum read size, not when you don't. I think I'm confusing. Let me check the source again.... OK. Now I understand my code better: (a) IO#read (without size) returns all available data on the IO. It doesn't block if O_NONBLOCK is set. I was wrong in [ruby-talk:66149]. (b) IO#read (with maximum size) raise an EWOULDBLOCK exception if the buffer is empty. It returns the buffer contents if the buffer is partially filled before EWOULDBLOCK. I'm not sure you're complaining to which behavior (or both). matz.