Direct connections:
- `nntp-open-network-stream' (the default),
- `nntp-open-ssl-stream',
+- `nntp-open-tls-stream',
- `nntp-open-telnet-stream'.
Indirect connections:
"*Hook run just before posting an article. It is supposed to be used
to insert Cancel-Lock headers.")
-(defvoo nntp-read-timeout (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
- (symbol-name system-type))
- 1.0
- 0.1)
- "How long nntp should wait between checking for the end of output.
-Shorter values mean quicker response, but is more CPU intensive.")
-
;;; Internal variables.
(defvar nntp-record-commands nil
(process-kill-without-query proc)
(save-excursion
(set-buffer buffer)
- (nntp-wait-for-string "^\r*20[01]")
+ (let ((nntp-connection-alist (list proc buffer nil)))
+ (nntp-wait-for-string "^\r*20[01]"))
+ (beginning-of-line)
+ (delete-region (point-min) (point))
+ proc)))
+
+(defun nntp-open-tls-stream (buffer)
+ (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number)))
+ (process-kill-without-query proc)
+ (save-excursion
+ (set-buffer buffer)
+ (let ((nntp-connection-alist (list proc buffer nil)))
+ (nntp-wait-for-string "^\r*20[01]"))
(beginning-of-line)
(delete-region (point-min) (point))
proc)))
(unless (< len 10)
(setq nntp-have-messaged t)
(nnheader-message 7 "nntp read: %dk" len)))
- (accept-process-output
- process
- (truncate nntp-read-timeout)
- (truncate (* (- nntp-read-timeout
- (truncate nntp-read-timeout))
- 1000)))
+ (nnheader-accept-process-output process)
;; accept-process-output may update status of process to indicate
;; that the server has closed the connection. This MUST be
;; handled here as the buffer restored by the save-excursion may