home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!rpi!ghost.dsi.unimi.it!insa-lyon.fr!univ-lyon1.fr!frmop11!psuvm!umab!tw
- Organization: University of Maryland at Baltimore
- Date: Thursday, 21 Jan 1993 14:12:56 EST
- From: Tom Williams <TW@UMAB.BITNET>
- Message-ID: <93021.141256TW@UMAB.BITNET>
- Newsgroups: comp.unix.programmer
- Subject: setsockopt problem
- Lines: 23
-
- I've got a problem using the BSD socket interface. I'm trying to
- set the time out for the read function using the setsockopt function:
-
- int sock, time = 10;
- rc = setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO, (char *)&time,
- sizeof time);
-
- I've previously called socket(), and it has executed correctly. When
- I call setsockopt(), I get rc = -1, and errno = 22 (EINVAL, invalid
- arguement according to errno.h).
-
- Any ideas on what I'm doing wrong?
-
- Thanks,
- Tom
-
- +----------------------------------------------------------------------------+
- | "Work and play are words used to describe the same thing under different |
- | conditions." |
- | - Mark Twain |
- | Bitnet: TW@UMAB Internet: TW@UMAB.UMD.EDU Phonenet: (410)706-4134 |
- | SnailNet: 100 N. Green Street, Baltimore, MD 21201 |
- +----------------------------------------------------------------------------+
-