home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5402 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!news.uiowa.edu!icaen!dsiebert
  3. From: dsiebert@icaen.uiowa.edu (Doug Siebert)
  4. Subject: What are the units of time in struct linger?
  5. Message-ID: <1992Nov23.121208.9795@icaen.uiowa.edu>
  6. Sender: usenet@icaen.uiowa.edu (UseNet News daemon)
  7. Organization: ISCA
  8. Date: Mon, 23 Nov 1992 12:12:08 GMT
  9. Lines: 26
  10.  
  11. I want to set a linger interval on a socket so it doesn't hang around forever
  12. in a CLOSING state with stuff in the send queue.  I'm given this helpful entry
  13. in TFM:
  14.  
  15. /*
  16.  * Structure used for manipulating linger option.
  17.  */
  18. struct  linger {
  19.         int     l_onoff;                /* option on/off */
  20.         int     l_linger;               /* linger time */
  21. };
  22.  
  23.  
  24. What exactly are the units of time for "linger time"?  Writing a test program
  25. seems a bit difficult in this case, since I don't know exactly how to simulate
  26. the conditions necessary for the linger option to come into play.  What I want
  27. is a linger time of maybe 5 seconds -- do I put a 5 in there, or is this in
  28. units other than seconds, as seems likely to me?
  29.  
  30. -- 
  31. /-----------------------------------------------------------------------------\
  32. | Doug Siebert                             | "I don't have to take this abuse |
  33. | Internet:  dsiebert@isca.uiowa.edu       |  from you - I've got hundreds of |
  34. | NeXTMail:  dsiebert@chop.isca.uiowa.edu  |  people waiting in line to abuse |
  35. |     ICBM:  41d 39m 55s N, 91d 30m 43s W  |  me!"  Bill Murray, Ghostbusters |
  36. \-----------------------------------------------------------------------------/
  37.