in reply to Re^2: IO::Socket::INET on win32
in thread IO::Socket::INET on win32

Pepper the code with ioctl() if $^O =~ /win32/i ...

Well, at the application level, probably the best thing you could do is override the IO::Socket constructor, strip the Blocking parameter on before instantiating the socket, and apply the ioctl() on the way out. Unfortunately, I don't think that will get you very far as I don't think the setting would be applied to sockets return by accept(), and then it starts getting messy.

Of course, the best thing would be to apply/submit a patch to IO::Socket to enable the correct behaviour for Win32, but given the length of time that the 'fix' has been known, the fact that none of the experts hereabouts and elsewhere have applied such a patch could suggest that it is non-trivial.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: IO::Socket::INET on win32
by dk (Chaplain) on Dec 14, 2007 at 00:02 UTC
    the fact that none of the experts hereabouts and elsewhere have applied such a patch could suggest that it is non-trivial

    Exactly. And that is what scares me most :(