From: Bill Kelly Date: 2006-02-24T12:20:18+09:00 Subject: Re: Mr. Guid 0.2 (Cross-platform Ruby GUI Debugger) From: "mitchell" > > Okay, my experiments show that TCP in the Windows version of Ruby > doesn't work like the Unix/Linux version. This is causing the > instability of the windows version of Mr. Guid. My only suggestion > right now for the Windows users is to get Ruby running in Cygwin. > > I would appreciate more help figuring out how to work around this > problem of course so that cygwin is not needed. > > Here is what I have figured out: > 1. The TCPServer starts correctly and runs the 'accept' method waiting > for a connection > 2. The TCPSocket successfully connects to the TCPServer. > 3. The TCPServer "freezes" (or craps out) when trying to print data > (print, puts methods) > 4. The TCPSocket "freezes" (or craps out) when trying to recieve data > (gets method) > > 3 and 4 work as expected in Unix/Linux, so Mr. Guid functions just > fine. It's just pesky Windows... Hi, I'm just jumping in here... dunno if this helps. But up through 1.8.2, Ruby didn't support non-blocking socket I/O on Windows. I haven't personally tried non-blocking I/O on 1.8.4 Windows Ruby yet--however, looking through the sources, it appears it is now supported! That said, I'm not certain gets/puts are nonblocking-savvy on Windows or not, even in 1.8.4. But it looks like send() should be, now. (And even in 1.8.4 I'm guessing popen() will still block in Windows. (It definitely blocks in 1.8.2...)) Well anyway, for what it's worth ........... Regards, Bill