Function: nntp-open-telnet-stream

nntp-open-telnet-stream is a byte-compiled function defined in nntp.el.gz.

Signature

(nntp-open-telnet-stream BUFFER)

Documentation

Open a nntp connection by telnet'ing the news server.

nntp-open-netcat-stream is recommended in place of this function because it is more reliable.

Please refer to the following variables to customize the connection:
- nntp-pre-command,
- nntp-telnet-command,
- nntp-telnet-switches,
- nntp-address,
- nntp-port-number,
- nntp-end-of-line.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nntp.el.gz
;; ==========================================================================
;; Replacements for the nntp-open-* functions -- drv
;; ==========================================================================

(defun nntp-open-telnet-stream (buffer)
  "Open a nntp connection by telnet'ing the news server.
`nntp-open-netcat-stream' is recommended in place of this function
because it is more reliable.

Please refer to the following variables to customize the connection:
- `nntp-pre-command',
- `nntp-telnet-command',
- `nntp-telnet-switches',
- `nntp-address',
- `nntp-port-number',
- `nntp-end-of-line'."
  (let ((command `(,nntp-telnet-command
		   ,@nntp-telnet-switches
		   ,nntp-address
		   ,(nntp-service-to-port nntp-port-number)))
	proc)
    (and nntp-pre-command
	 (push nntp-pre-command command))
    (setq proc (apply #'start-process "nntpd" buffer command))
    (with-current-buffer buffer
      (nntp-wait-for-string "^\r*20[01]")
      (beginning-of-line)
      (delete-region (point-min) (point))
      proc)))