In article <200101011404.f01E4s901794 / orsay1.moulon.inra.fr>,
  ts <decoux / moulon.inra.fr> wrote:
> >>>>> "P" == Peter Yu <roger_callisto / hotmail.com> writes:
>
> P> Anyone know what I'm doing wrong?
>
>  Perhaps you can try to set it in nonblocking mode, and catch
>  Errno::EWOULDBLOCK

Thanks! After looking at the C socket library, that appears to be
what's missing...

How does one set the socket as non-blocking in Ruby, though? =)

Doing something like:
FIONBIO = 0x8004667E  #Magic number from ioctl.h
conn = s.accept
conn.ioctl(FIONBIO, 1)

Doesn't appear to work, as it just hangs after the ioctl call.

Any ideas? =)

Thanks again!
Peter Yu


Sent via Deja.com
http://www.deja.com/