From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,d4c1f7c0fe672a4 X-Google-Attributes: gid1020c6,public X-Google-Thread: 1070f0,d4c1f7c0fe672a4 X-Google-Attributes: gid1070f0,public X-Google-Thread: 1164f8,d4c1f7c0fe672a4 X-Google-Attributes: gid1164f8,public X-Google-Thread: fcda7,d4c1f7c0fe672a4 X-Google-Attributes: gidfcda7,public X-Google-Thread: 111731,d4c1f7c0fe672a4 X-Google-Attributes: gid111731,public X-Google-Thread: 10872d,d4c1f7c0fe672a4 X-Google-Attributes: gid10872d,public From: dridley@vtaix.cc.vt.edu (Michael Ridley) Subject: Re: Night time Re: Different UNIX pro's and con's. Date: 1998/10/05 Message-ID: <6va495$4ni$1@solaris.cc.vt.edu>#1/1 X-Deja-AN: 397856920 References: <6tovb9$rs4$1@enterprise.nssl.noaa.gov> <3601DE1E.B03FA547@home.com> <3601EACB.93BB1252@home.com> <3603F04E.315ADEE2@gce.com> <36112946.D2CC7640@kodak.com> Followup-To: comp.unix.advocacy,comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec X-Complaints-To: abuse@vt.edu X-Trace: solaris.cc.vt.edu 907580517 4850 198.82.161.244 (5 Oct 1998 09:41:57 GMT) Organization: Virginia Tech, Blacksburg, Virginia, USA NNTP-Posting-Date: 5 Oct 1998 09:41:57 GMT Newsgroups: comp.unix.advocacy,comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec Thomas Tornblom (no@spam.please) wrote: : You would definitely *not* want KEEPALIVE on the socket. From man : setsockopt: : SO_KEEPALIVE Keeps connections active by enabling the : periodic transmission of messages, if this is : supported by the protocol. This option takes : an int value. : If the connected socket fails to respond to : these messages, the connection is broken and : processes writing to that socket are notified : with a SIGPIPE signal. : Don't know how this interact with a window size = 0. : It was a few years ago I tested this. Things may have changed, or my : memory might be fading. It could have been xterms instead of telnet. : I need to check this again. A few thoughts/clarifications on this issue. It's a pretty simple question he was originally answered but I don't think he's gotten a clear answer. Here's the deal - as you say, if SO_KEEPALIVE is set in the source code on either the telnetd or the telnet client, then after a few hours of no traffic, a keep-alive will be sent over the link and if it fails, the link will be closed. This is the norm for telnet servers and clients, as it's usually what you'd want. To fix the "problem" you would need to get a copy of the telnet source and the telnet server source and turn off the keep alive (by finding the setsockopt() function call and removing the SO_KEEPALIVE argument). The 0 window size is only a factor if there is data waiting to be sent. If there *IS* data queued up in the telnet path when the plug is pulled, then the TCP socket will close as the normal TCP flow control actions take effect. There isn't really a way to get around that, except of course to not pull the plug when there is data still being sent. Also- this is generic to TCP, and not specific to telnet, network xterms, etc. -Michael