Function: starttls-open-stream

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

Signature

(starttls-open-stream NAME BUFFER HOST PORT)

Documentation

Open a TLS connection for a port to a host.

Returns a subprocess object to represent the connection. Input and output work as for subprocesses; delete-process closes it. Args are NAME BUFFER HOST PORT. NAME is name for process. It is modified if necessary to make it unique. BUFFER is the buffer (or buffer-name) to associate with the process.
 Process output goes at end of that buffer, unless you specify
 a filter function to handle the output.
 BUFFER may be also nil, meaning that this process is not associated
 with any buffer
Third arg is name of the host to connect to, or its IP address. Fourth arg PORT is an integer specifying a port to connect to. If starttls-use-gnutls is nil, this may also be a service name, but GnuTLS requires a port number.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/starttls.el.gz
;;;###autoload
(defun starttls-open-stream (name buffer host port)
  "Open a TLS connection for a port to a host.
Returns a subprocess object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
Args are NAME BUFFER HOST PORT.
NAME is name for process.  It is modified if necessary to make it unique.
BUFFER is the buffer (or `buffer-name') to associate with the process.
 Process output goes at end of that buffer, unless you specify
 a filter function to handle the output.
 BUFFER may be also nil, meaning that this process is not associated
 with any buffer
Third arg is name of the host to connect to, or its IP address.
Fourth arg PORT is an integer specifying a port to connect to.
If `starttls-use-gnutls' is nil, this may also be a service name, but
GnuTLS requires a port number."
  (if starttls-use-gnutls
      (starttls-open-stream-gnutls name buffer host port)
    (message "Opening STARTTLS connection to `%s:%s'" host (format "%s" port))
    (let* ((process-connection-type starttls-process-connection-type)
	   (process (apply #'start-process
			   name buffer starttls-program
			   host (format "%s" port)
			   starttls-extra-args)))
      (set-process-query-on-exit-flag process nil)
      process)))