From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2405e78c9ad6a058,start X-Google-Attributes: gidfee84,public From: mueller@PROBLEM_WITH_INEWS_GATEWAY_FILE (Bernd Mueller) Subject: TCP Programming: Howto set timeout?? Date: 1996/04/03 Message-ID: <4jt8fd$aud@hdihp3.fzk.de>#1/1 X-Deja-AN: 145561430 distribution: world organization: Forschungszentrum Karlsruhe newsgroups: comp.unix.osf.osf1 Subject: TCP Programming: Howto set timeout?? Hi, I am writing an application including some data transfer with tcp. It works fine, but I want the call of recv(..) to terminate after a certain timeout is reached. I use the setsockopt(socket,SOL_SOCKET , SO_RCVTIMEO, &timeout, sizeof(int)) but it does not show any effect. Using the protocol level IPPROTO_TCP as the second argument leads to an error in setsockopt. What am I doing wrong?? Is anyone in this group experienced with TCP programming and can give me a clue? Thanks in advance Bernd Mueller Forschungszentrum Karlsruhe mueller@iai.fzk.de P.S. We are running OSF1 V.3.2