home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / w3 / ssl.el < prev    next >
Encoding:
Text File  |  1995-05-13  |  2.2 KB  |  55 lines

  1. ;;; ssl.el,v --- ssl functions for emacsen without them builtin
  2. ;; Author: wmperry
  3. ;; Created: 1995/05/08 16:20:30
  4. ;; Version: 1.1
  5. ;; Keywords: comm
  6.  
  7. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8. ;;; Copyright (c) 1995 by William M. Perry (wmperry@spry.com)
  9. ;;;
  10. ;;; This file is not part of GNU Emacs, but the same permissions apply.
  11. ;;;
  12. ;;; GNU Emacs is free software; you can redistribute it and/or modify
  13. ;;; it under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 2, or (at your option)
  15. ;;; any later version.
  16. ;;;
  17. ;;; GNU Emacs is distributed in the hope that it will be useful,
  18. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Emacs; see the file COPYING.  If not, write to
  24. ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  25. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  26.  
  27. (defvar ssl-program-name "ssl"
  28.   "*The program to run in a subprocess to open an SSL connection.")
  29.  
  30. (defun open-ssl-stream (name buffer host service)
  31.   "Open a SSL connection for a service to a host.
  32. Returns a subprocess-object to represent the connection.
  33. Input and output work as for subprocesses; `delete-process' closes it.
  34. Args are NAME BUFFER HOST SERVICE.
  35. NAME is name for process.  It is modified if necessary to make it unique.
  36. BUFFER is the buffer (or buffer-name) to associate with the process.
  37.  Process output goes at end of that buffer, unless you specify
  38.  an output stream or filter function to handle the output.
  39.  BUFFER may be also nil, meaning that this process is not associated
  40.  with any buffer
  41. Third arg is name of the host to connect to, or its IP address.
  42. Fourth arg SERVICE is name of the service desired, or an integer
  43.  specifying a port number to connect to."
  44.   (let ((proc (start-process name buffer 
  45.                  ssl-program-name
  46.                  host 
  47.                  (if (stringp service)
  48.                  service
  49.                    (int-to-string service))
  50.                  )))
  51.     (process-kill-without-query proc)
  52.     proc))
  53.  
  54. (provide 'ssl)
  55.