home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / protocol / tcpip / 6040 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.3 KB

  1. Path: sparky!uunet!usc!rpi!ghost.dsi.unimi.it!insa-lyon.fr!univ-lyon1.fr!frmop11!psuvm!umab!tw
  2. Organization: University of Maryland at Baltimore
  3. Date: Thursday, 21 Jan 1993 14:11:40 EST
  4. From: Tom Williams <TW@UMAB.BITNET>
  5. Message-ID: <93021.141140TW@UMAB.BITNET>
  6. Newsgroups: comp.protocols.tcp-ip
  7. Subject: setsockopt problem
  8. Lines: 23
  9.  
  10. I've got a problem using the BSD socket interface.  I'm trying to
  11. set the time out for the read function using  the setsockopt function:
  12.  
  13.    int  sock,  time = 10;
  14.    rc  = setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO, (char *)&time,
  15.        sizeof time);
  16.  
  17. I've previously called socket(), and it has executed correctly.  When
  18. I call setsockopt(), I get rc = -1, and errno = 22 (EINVAL, invalid
  19. arguement according to errno.h).
  20.  
  21. Any ideas on what I'm doing wrong?
  22.  
  23. Thanks,
  24.     Tom
  25.  
  26. +----------------------------------------------------------------------------+
  27. | "Work and play are words used to describe the same thing under different   |
  28. |  conditions."                                                              |
  29. |                                                            - Mark Twain    |
  30. | Bitnet: TW@UMAB     Internet: TW@UMAB.UMD.EDU     Phonenet: (410)706-4134  |
  31. | SnailNet: 100 N. Green Street, Baltimore, MD  21201                        |
  32. +----------------------------------------------------------------------------+
  33.