From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079034715841.tru64-unix-managers.marc@archive.invalid> From: "Wigg, David" Date: Tue, 26 Jan 1999 14:40:42 +0000 To: tru64-unix-managers Subject: socket connect timeout adjustable? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079034715841 Hi managers, I have a C program that uses socket communication over TCP to communicate with various hosts. Currently, when I issue a connect to a host that is uncontactable, the connect call takes 75 seconds to return before it decides the host is unreachable. What I want it to do is to fail after say 3 or 4 seconds. I have tried setting send and recv timeouts using setsockopt, but I still have the same problem. The man pages for setsockopt suggests there is a way to make the socket non blocking, but I can't find any info on how to do this. Could someone point in the direction of some suitable info? Thanks Best Regards, Dave David Wigg Senior Consultant Solutions Integration, Wang Global, Phone: +44(0)161 848 4146 Email : david.wigg@wang.com mailto:david.wigg@wang.com