From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,ec83737a7b22dd85,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: 1164f8,ec83737a7b22dd85,start X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,ec83737a7b22dd85,start X-Google-Attributes: gidfee84,public From: kelsey@vesta01.SLAC.Stanford.EDU (Mike Kelsey) Subject: Bug? in Alpha/OSF1 V3.2 -- setsockopt(...SO_RCVTIMEO...) Date: 1997/09/16 Message-ID: <5vmi9p$58o$2@nntp.Stanford.EDU>#1/1 X-Deja-AN: 273024027 Followup-To: poster Distribution: world Organization: University of British Columbia Newsgroups: comp.sys.dec,comp.unix.osf.osf1,comp.unix.questions [I have set Followup-To: poster. If I get a solution I'll post a followup.] I am writing a fairly simple socket application using SOCK_STREAM. After creating and binding the socket, I want to set a data-I/O timeout, using a Digital extension to setsockopt() (BTW, it's also a valid extension under AIX, for what that's worth). Specifically, I set struct timeval timeout = {10,0}; /* s is my socket file descriptor */ stat = setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (void *)&timeout, sizeof timeout); if (stat != 0) perror("setsockopt"); What I get back is the error message "Argument out of domain" (errno==EDOM). I hve tried doing this with my parent socket (i.e., after socket()), as well as with the child socket (i.e., after accept()). I get the same error in both cases. I have been unable to find any documentation on the subject. DEC's Web-based documents mention "setsockopt" but refer to the man page for details. The man page setsockopt(2) cites SO_RCVTIMEO as a valid [Digital] (extension) option, and does not indicate any limitations on its use. I've scanned c.s.d, c.u.o.o, c.u.q, and the unix-sockets-faq and found no indication of an problem (actually, no mention of SO_RCVTIMEO at all :-( ). Is there a known bug in OSF1 V3.2 with respect to this socket option? Does anyone know if there are limitations on what kind of socket (DGRAM only???) with which this option may be used, or if there are limitations on the timeout interval? Regards, Michael Kelsey, UBC -- [ My opinions are not endorsed by SLAC, UBC, or any other authority ] "I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I've watched C-beams glitter in the dark near the Tannhauser Gate. All these moments will be lost in time, like tears in rain." -- Roy Batty