[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can we set-network-process-option process :keepalive t by default?
From: |
Stefan Monnier |
Subject: |
Re: Can we set-network-process-option process :keepalive t by default? |
Date: |
Thu, 26 Jan 2012 12:18:57 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
> 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