Win32 Socket Timeout woes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

A question to all the win32 perl-ers out there.. . .

I searched google quite a bit yesterday, searched this group, and was
not able to figure out a solution to this problem.

Is it true you cannot change the 'connect' timeout of a socket in
win32? I assume you can't, so I tried using the alarm signal as shown
on a few different pages here and there to timeout the socket, yet
could not get it to work.

It's as if a socket-call locks up the entire script, such that it
doesn't even respond to the alarm-signal. The script will timeout if I
lock it up with a while (1==1) loop, but if I replace that with a
socket-connect, it doesn't work at all.

I then noticed how simple this solution is on a linux box. . . the
"timeout" parameter actually works in the socket creation.

I can post code, but it's just more of a general question, .. is it
possible to change the timeout of the socket in win32?

I love perl, but don't know much of it, so go easy on me.

Re: Win32 Socket Timeout woes

Quoted text here. Click to load it

Alarm only works on more recent versions of Perl on Win32.   I don't know
which version it first supported, but I do know that it didn't work in
5.6.1, but it does on 5.8.8.

Site Timeline