From: Eric Hodel Date: 2007-08-14T18:27:28+09:00 Subject: Re: TCPSocket select method On Aug 13, 2007, at 23:54, Sylvain Joyeux wrote: > On Monday 13 August 2007, Roger Pack wrote: >> Hmm. If you create a method thus: >> class TCPSocket >> def readableNow? >> r,w,e = select([self],nil,nil,0) >> return r != nil >> end >> end >> >> It turns out to use a select OTHER than IO.select. Anyone know, by >> chance what the 'internal' select method does? > It cannot use IO.select since IO.select is a singleton method of IO > and a > TCPSocket object is an instance of IO. The only way to explicitely get > IO.select is to call > r,w,e = IO.select(...) > > It calls Kernel#select. And I wouldn't be surprised if > Kernel#select and > IO.select were actually the same method ... They are. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars