* Can we set-network-process-option process :keepalive t by default?
@ 2012-01-26 15:13 Ted Zlatanov
2012-01-26 17:18 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Ted Zlatanov @ 2012-01-26 15:13 UTC (permalink / raw
To: emacs-devel
This is the code we use currently on Gnus IMAP and NNTP connections:
(when (and (fboundp 'set-network-process-option) ;; Unavailable in XEmacs.
(fboundp 'process-type) ;; Emacs 22 doesn't provide it.
(eq (process-type process) 'network))
;; Use TCP-keepalive so that connections that pass through a NAT router
;; don't hang when left idle.
(set-network-process-option process :keepalive t))
I think nowadays it makes sense to set that as the default for all Emacs
network connections (though the user should be able to turn it off, and
the OS has to allow it of course). Can we make that change after 24.1
is out?
Thanks
Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can we set-network-process-option process :keepalive t by default?
2012-01-26 15:13 Can we set-network-process-option process :keepalive t by default? Ted Zlatanov
@ 2012-01-26 17:18 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2012-01-26 17:18 UTC (permalink / raw
To: emacs-devel
> This is the code we use currently on Gnus IMAP and NNTP connections:
> (when (and (fboundp 'set-network-process-option) ;; Unavailable in XEmacs.
> (fboundp 'process-type) ;; Emacs 22 doesn't provide it.
> (eq (process-type process) 'network))
> ;; Use TCP-keepalive so that connections that pass through a NAT router
> ;; don't hang when left idle.
> (set-network-process-option process :keepalive t))
> I think nowadays it makes sense to set that as the default for all Emacs
> network connections (though the user should be able to turn it off, and
> the OS has to allow it of course). Can we make that change after 24.1
> is out?
I think I'd rather keep the default behavior of Elisp code close to the
default behavior of C code in this respect.
BTW, instead of process-type, couldn't you use (eq (process-status process)
'open), so as to avoid the (fboundp 'process-type)?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-26 17:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 15:13 Can we set-network-process-option process :keepalive t by default? Ted Zlatanov
2012-01-26 17:18 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.