timeout when reading from a server socket.

D

Darryl Perry

I'm trying to write a simple finger client in perl on Redhat 9.0. I
can get it to read just fine, that's not the problem. The problem is
that when it tries to connect to a server that is not responding, it
takes several minutes before it fails. I would like to set up a
timeout value to like 10 seconds. Can anybody recommend a way for me
to do this? I've already tried alarm(), but that has unwanted side
effects when the alarm time has been reached.

Any help would be appreciated.

Regards,
Darryl Perry
 

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

No members online now.

Forum statistics

Threads
474,150
Messages
2,570,853
Members
47,394
Latest member
Olekdev

Latest Threads

Top