More annoying socket questions

Sounds good. The documentation on this is sketchy. Any suggestions.

Thanks,

Mark

···

-----Original Message-----
From: ts [mailto:decoux@moulon.inra.fr]
Sent: 26 June 2002 14:35
To: ruby-talk@ruby-lang.org
Subject: Re: more annoying socket questions.

“F” == “Firestone, Mark ← Technical Support”
mark.firestone@gossgraphic.co.uk> writes:

How can I get my pages to work without the user having to do something at
a
prompt (like press return)? In Pascal, Wayne Conrad in his IO routines
provided me with a way of telling if there was something in the buffer,
and
then reading it. Ruby doesn’t seem to do this. Failing a way to handle
that, is there any way round this?

Try to use IO::select if you want to know if you can read from a IO

Guy Decoux

NOTICE: This e-mail and any attachment(s) may contain confidential and
proprietary information of Goss International Corporation and/or its
subsidiaries and may be legally privileged. This e-mail is intended solely
for the addressee. If you are not the addressee, dissemination, copying or
other use of this e-mail or any of its content is strictly prohibited and
may be unlawful. If you are not the intended recipient please inform the
sender immediately and destroy the e-mail and any copies. All liability for
viruses is excluded to the fullest extent permitted by law. Any views
expressed in this message are those of the individual sender. No contract
may be construed by this e-mail.

Sounds good. The documentation on this is sketchy. Any suggestions.

You have an example in

  http://www.rubycentral.com/book/ref_m_kernel.html#Kernel.select

it look if it exist something to read from $stdin (the timeout is at 1.5
second)

Guy Decoux