Does Ruby support Asyncronous Sockets on Win32

The Programming Ruby book lists
IO.fcntl() as not supported on all platforms.

Does cygwin vs. non cygwin make a difference.

And if it’s supported, does
sysread() return 0 when the client disconnects.

The Programming Ruby book lists
IO.fcntl() as not supported on all platforms.

These flags are supported in MS VC build of Ruby:

irb(main):001:0> require ‘fcntl’
true
irb(main):002:0> Fcntl.constants
[“O_APPEND”, “O_WRONLY”, “O_TRUNC”, “O_RDWR”, “O_EXCL”, “O_RDONLY”,
“O_CREAT”]
irb(main):003:0>

As you can see there is no flag for nonblocking IO.

Does cygwin vs. non cygwin make a difference.

I believe so but I did not test the cygwin version.

And if it’s supported, does
sysread() return 0 when the client disconnects.

Does not work for me with MS VC build and WinXP. sysread is blocked like
anything else.

Dalibor Sramek

···

On Wed, Nov 20, 2002 at 04:30:18AM +0900, MetalOne wrote:


Dalibor Sramek “In the eyes of cats, all things belong to cats.”
dali@insula.cz