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