Connect to sockets is so sloooww

Subject: Connect to sockets is so sloooww
From: William K. Gibson (
Date: Fri Mar 02 2001 - 06:54:45 MST

I'm using the connect() call in a C program on YDL to get remote HTTP docs.
Works great for sites that are up- but sites that are down seem to make
connect() hang for huge amounts of time. I tried looking at the man page for
connect() but there does not seem to be any timeout setting.

So, is there some kind of timeout setting for socket connections either in C
or globally for the linux system? I know that /etc/resolv.conf can be set up
with timout information for dns servers (like when using gethostbyname())
but this does not seem to help with connect().

Can anyone float me an idea?

--William K. Gibson
1stDesk Systems

This archive was generated by hypermail 2a24 : Fri Mar 02 2001 - 06:54:43 MST