Function: network-service-connection

network-service-connection is a byte-compiled function defined in net-utils.el.gz.

Signature

(network-service-connection HOST SERVICE)

Documentation

Open a network connection to SERVICE on HOST.

The port to use is determined from network-connection-service-alist.

Source Code

;; Defined in /usr/src/emacs/lisp/net/net-utils.el.gz
(defun network-service-connection (host service)
  "Open a network connection to SERVICE on HOST.
The port to use is determined from `network-connection-service-alist'."
  (let* ((process-name (concat "Network Connection [" host " " service "]"))
	 (portnum (string-to-number service))
	 (buf (get-buffer-create (concat "*" process-name "*"))))
    (or (zerop portnum) (setq service portnum))
    (make-comint
     process-name
     (cons host service))
    (set-buffer buf)
    (network-connection-mode)
    (network-connection-mode-setup host service)
    (pop-to-buffer buf)))