aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-02-15 00:48:45 -0800
committerGlenn Morris2012-02-15 00:48:45 -0800
commitd7dbb11ade52e6b5e77e7286b61cb3e7bd720f0d (patch)
treee7ff10341fa9d1d64a67f9837086bb6c6b7898f4
parent13932042d304ae888790efddb4706446952e237c (diff)
downloademacs-d7dbb11ade52e6b5e77e7286b61cb3e7bd720f0d.tar.gz
emacs-d7dbb11ade52e6b5e77e7286b61cb3e7bd720f0d.zip
* lispref/processes.texi (Network): Document open-network-stream :parameters.
* etc/NEWS: Related markup.
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/processes.texi84
-rw-r--r--etc/NEWS1
3 files changed, 86 insertions, 3 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index baab5113057..296b4e90b4b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12012-02-15 Glenn Morris <rgm@gnu.org>
2
3 * processes.texi (Network): Document open-network-stream :parameters.
4
12012-02-14 Chong Yidong <cyd@gnu.org> 52012-02-14 Chong Yidong <cyd@gnu.org>
2 6
3 * keymaps.texi (Format of Keymaps): The CACHE component of keymaps 7 * keymaps.texi (Format of Keymaps): The CACHE component of keymaps
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 4cfc954cd1f..a5a507c700e 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1939,9 +1939,10 @@ queued but input may be lost. You can use the function
1939@code{process-command} to determine whether a network connection or 1939@code{process-command} to determine whether a network connection or
1940server is stopped; a non-@code{nil} value means yes. 1940server is stopped; a non-@code{nil} value means yes.
1941 1941
1942@defun open-network-stream name buffer-or-name host service 1942@cindex encrypted network connections
1943This function opens a TCP connection, and returns a process object 1943@defun open-network-stream name buffer-or-name host service &rest parameters
1944that represents the connection. 1944This function opens a TCP connection, with optional encryption, and
1945returns a process object that represents the connection.
1945 1946
1946The @var{name} argument specifies the name for the process object. It 1947The @var{name} argument specifies the name for the process object. It
1947is modified as necessary to make it unique. 1948is modified as necessary to make it unique.
@@ -1955,6 +1956,83 @@ associated with any buffer.
1955The arguments @var{host} and @var{service} specify where to connect to; 1956The arguments @var{host} and @var{service} specify where to connect to;
1956@var{host} is the host name (a string), and @var{service} is the name of 1957@var{host} is the host name (a string), and @var{service} is the name of
1957a defined network service (a string) or a port number (an integer). 1958a defined network service (a string) or a port number (an integer).
1959
1960@c FIXME? Is this too lengthy for the printed manual?
1961The remaining arguments @var{parameters} are keyword/argument pairs
1962that are mainly relevant to encrypted connections:
1963
1964@table @code
1965
1966@item :nowait @var{boolean}
1967If non-@code{nil}, try to make an asynchronous connection.
1968
1969@item :type @var{type}
1970The type of connection. Options are:
1971
1972@table @code
1973@item plain
1974An ordinary, unencrypted connection.
1975@item tls
1976@itemx ssl
1977A TLS (``Transport Layer Security'') connection.
1978@item nil
1979@itemx network
1980Start with a plain connection, and if parameters @samp{:success}
1981and @samp{:capability-command} are supplied, try to upgrade to an encrypted
1982connection via STARTTLS. If that fails, retain the unencrypted connection.
1983@item starttls
1984As for @code{nil}, but if STARTTLS fails drop the connection.
1985@item shell
1986A shell connection.
1987@end table
1988
1989@item :always-query-capabilities @var{boolean}
1990If non-@code{nil}, always ask for the server's capabilities, even when
1991doing a @samp{plain} connection.
1992
1993@item :capability-command @var{capability-command}
1994Command string to query the host capabilities.
1995
1996@item :end-of-command @var{regexp}
1997@itemx :end-of-capability @var{regexp}
1998Regular expression matching the end of a command, or the end of the
1999command @var{capability-command}. The latter defaults to the former.
2000
2001@item :starttls-function @var{function}
2002Function of one argument (the response to @var{capability-command}),
2003which returns either @code{nil}, or the command to activate STARTTLS
2004if supported.
2005
2006@item :success @var{regexp}
2007Regular expression matching a successful STARTTLS negotiation.
2008
2009@item :use-starttls-if-possible @var{boolean}
2010If non-@code{nil}, do opportunistic STARTTLS upgrades even if Emacs
2011doesn't have built-in TLS support.
2012
2013@item :client-certificate @var{list-or-t}
2014Either a list of the form @code{(@var{key-file} @var{cert-file})},
2015naming the certificate key file and certificate file itself, or
2016@code{t}, meaning to query @code{auth-source} for this information
2017(@pxref{Top,,auth-source, auth, Emacs auth-source Library}).
2018Only used for TLS or STARTTLS.
2019
2020@item :return-list @var{cons-or-nil}
2021The return value of this function. If omitted or @code{nil}, return a
2022process object. Otherwise, a cons of the form @code{(@var{process-object}
2023. @var{plist})}, where @var{plist} has keywords:
2024
2025@table @code
2026@item :greeting @var{string-or-nil}
2027If non-@code{nil}, the greeting string returned by the host.
2028@item :capabilities @var{string-or-nil}
2029If non-@code{nil}, the host's capability string.
2030@item :type @var{symbol}
2031The connection type: @samp{plain} or @samp{tls}.
2032@end table
2033
2034@end table
2035
1958@end defun 2036@end defun
1959 2037
1960@node Network Servers 2038@node Network Servers
diff --git a/etc/NEWS b/etc/NEWS
index d3e946819d4..4c6552f7db5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1289,6 +1289,7 @@ behavior of `completing-read'.
1289** `glyphless-char-display' can now distinguish between graphical and 1289** `glyphless-char-display' can now distinguish between graphical and
1290text terminal display, via a char-table entry that is a cons cell. 1290text terminal display, via a char-table entry that is a cons cell.
1291 1291
1292+++
1292** `open-network-stream' can now be used to open an encrypted stream. 1293** `open-network-stream' can now be used to open an encrypted stream.
1293It now accepts an optional `:type' parameter for initiating a TLS 1294It now accepts an optional `:type' parameter for initiating a TLS
1294connection, directly or via STARTTLS. To do STARTTLS, additional 1295connection, directly or via STARTTLS. To do STARTTLS, additional