IIRC, sockets on Windows are blocking by default, so without seeing the
code for ETSocketLink() itself, I couldn’t say more.
Non-blocking I/O on Win32 has always been a pain from what I’ve read. I
recommend searching around on the comp.os.ms-windows.programmer.*
newsgroups to see what they have to say on the subject (or the docs on
msdn.com).
Regards,
Dan
···
-----Original Message-----
From: Michael Hale [mailto:michael@halefamilysite.com]
Sent: Wednesday, December 03, 2003 2:35 PM
To: ruby-talk ML
Subject: c extension troubles on windowsHi ruby extension geeks, and thanks in advance for your help.
The short version of the issue that I am struggling with is
that I have
a native library I created a ruby extension for. The extension works
on linux, but on windows it does not.I have copies of the library I am extending for both windows
and linux
from our vendor (Spirent). I am using gcc on linux and MSVC.NET on
windows. Everything compiles and links without complaining.On both windows and linux I am able to successfully execute
the method
“ETGetLibVersion” which gives me back the library version. I
run into
trouble on windows when I try to call “ETSocketLink”. On linux this
call connects and returns as I would expect, however on windows it
connects and blocks. For example when I do a printf before and after
this call I only get output from the first printf and I have to kill
the process to get my cursor back.