in reply to IO::Socket Timeout?
IO::Socket uses alarm() to time-out a connect(). But Win32 doesn't have alarm() so under Win32 IO::Socket just silently doesn't do the alarm() and the connect() will hang as long as it wants to.
Of course, you could use async sockets to do an async connect() and even patch IO::Socket to support this since it is perhaps more portable than alarm(). Unfortunately that won't help you since every version of WinSock I've found has a bug where connect() on an async socket doesn't work. Win32 does support async TCP/IP connects but you have to use the proprietary APIs to avoid the bug.
Anyway, I thought some more details might be interesting.
Sorry, I don't have details on Win32::Internet and if that allow async connections. If it does, perhaps IO::Socket should be patched to use that if it is available and time-outs are requested.
- tye (but my friends call me "Tye")
|
|---|