home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!metro!otc!gerry!chrisf
- From: chrisf@nms.otca.oz.au (Christopher Fraser)
- Newsgroups: comp.unix.programmer
- Subject: Problems with keepalive under SunOS 4.1.X
- Keywords: networking, SunOS
- Message-ID: <chrisf.726116175@gerry>
- Date: 4 Jan 93 02:56:15 GMT
- Sender: news@otc.otca.oz
- Lines: 29
-
- Hi,
-
- I'm trying to get keepalive working on SOCK_STREAM sockets under SunOS 4.1.X.
- To turn on keepalive I'm using (and I may be wrong, the Sun documentation
- is a bit vauge):
-
- int s = socket(AF_INET, SOCK_STREAM, 0);
- int keepalive = 1;
- setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(keepalive));
-
- I make connection to another machine, block on a read, and unplug the other
- machine ... and nothing happens. Any ideas? I'd especially appreciate pointers
- to more comprehensive documentation.
-
- Even if I can get keepalive working, the default time out seems to be an hour:
-
- #define TCPTV_KEEP_IDLE (120*60*PR_SLOWHZ) /* dflt time before probing */
-
- which isn't much use for me. How does one change this value? Can it be changed?
-
- If it can't, is there some way I can generate the probes myself?
-
- If you've got any ideas, please email. I'll summarise if there is sufficient
- interest.
-
- Cheers,
- --
- Christopher Fraser "First time surrealists are often confused by the
- chrisf@nms.otca.oz.au similarities between fish and telephones"
-