Win32 Socket Timeout woes

D

dmcglynn

Hello.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top