diff options
| author | Lars Ingebrigtsen | 2016-02-22 15:06:33 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-22 15:06:33 +1100 |
| commit | f577f59a5216bc7708bb840f5eac3e82950e81e8 (patch) | |
| tree | c154db8bc4b920ea06c98efb7fc407562753b2d6 /doc | |
| parent | 5df6e3212bbb3213d1704dab89299a96b60eac6d (diff) | |
| parent | 0d3c0f6f906d5494f76b8b686bae72853b1f729c (diff) | |
| download | emacs-f577f59a5216bc7708bb840f5eac3e82950e81e8.tar.gz emacs-f577f59a5216bc7708bb840f5eac3e82950e81e8.zip | |
Fix merge conflicts in network-stream-tests.el
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/processes.texi | 29 | ||||
| -rw-r--r-- | doc/misc/emacs-gnutls.texi | 12 |
2 files changed, 38 insertions, 3 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index f660b159386..79cebaa79fa 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -2415,8 +2415,33 @@ without waiting for the connection to complete. When the connection | |||
| 2415 | succeeds or fails, Emacs will call the sentinel function, with a | 2415 | succeeds or fails, Emacs will call the sentinel function, with a |
| 2416 | second argument matching @code{"open"} (if successful) or | 2416 | second argument matching @code{"open"} (if successful) or |
| 2417 | @code{"failed"}. The default is to block, so that | 2417 | @code{"failed"}. The default is to block, so that |
| 2418 | @code{make-network-process} does not return until the connection | 2418 | @code{make-network-process} does not return until the connection has |
| 2419 | has succeeded or failed. | 2419 | succeeded or failed. |
| 2420 | |||
| 2421 | If you're setting up an asynchronous TLS connection, you have to also | ||
| 2422 | provide the @code{:tls-parameters} parameter (see below). | ||
| 2423 | |||
| 2424 | Depending on the capabilities of Emacs, how asynchronous | ||
| 2425 | @code{:nowait} is may vary. The three elements that may (or may not) | ||
| 2426 | be done asynchronously are domain name resolution, socket setup, and | ||
| 2427 | (for TLS connections) TLS negotiation. | ||
| 2428 | |||
| 2429 | Many functions that interact with process objects, (for instance, | ||
| 2430 | @code{process-datagram-address}) rely on them at least having a socket | ||
| 2431 | before they can return a useful value. These functions will block | ||
| 2432 | until the socket has achieved the desired status. The recommended way | ||
| 2433 | of interacting with asynchronous sockets is to place a sentinel on the | ||
| 2434 | process, and not try to interact with it before it has changed status | ||
| 2435 | to @samp{"run"}. That way, none of these functions will block. | ||
| 2436 | |||
| 2437 | @item :tls-parameters | ||
| 2438 | When opening a TLS connection, this should be where the first element | ||
| 2439 | is the TLS type (which should either be @code{gnutls-x509pki} or | ||
| 2440 | @code{gnutls-anon}, and the remaining elements should form a keyword | ||
| 2441 | list acceptable for @code{gnutls-boot}. (This keyword list can be | ||
| 2442 | optained from the @code{gnutls-boot-parameters} function.) The TLS | ||
| 2443 | connection will then be negotiated after completing the connection to | ||
| 2444 | the host. | ||
| 2420 | 2445 | ||
| 2421 | @item :stop @var{stopped} | 2446 | @item :stop @var{stopped} |
| 2422 | If @var{stopped} is non-@code{nil}, start the network connection or | 2447 | If @var{stopped} is non-@code{nil}, start the network connection or |
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi index 1a850c68235..115727fb8ee 100644 --- a/doc/misc/emacs-gnutls.texi +++ b/doc/misc/emacs-gnutls.texi | |||
| @@ -173,7 +173,7 @@ Just use @code{open-protocol-stream} or @code{open-network-stream} | |||
| 173 | You should not have to use the @file{gnutls.el} functions directly. | 173 | You should not have to use the @file{gnutls.el} functions directly. |
| 174 | But you can test them with @code{open-gnutls-stream}. | 174 | But you can test them with @code{open-gnutls-stream}. |
| 175 | 175 | ||
| 176 | @defun open-gnutls-stream name buffer host service | 176 | @defun open-gnutls-stream name buffer host service &optional nowait |
| 177 | This function creates a buffer connected to a specific @var{host} and | 177 | This function creates a buffer connected to a specific @var{host} and |
| 178 | @var{service} (port number or service name). The parameters and their | 178 | @var{service} (port number or service name). The parameters and their |
| 179 | syntax are the same as those given to @code{open-network-stream} | 179 | syntax are the same as those given to @code{open-network-stream} |
| @@ -181,6 +181,10 @@ syntax are the same as those given to @code{open-network-stream} | |||
| 181 | Manual}). The connection process is called @var{name} (made unique if | 181 | Manual}). The connection process is called @var{name} (made unique if |
| 182 | necessary). This function returns the connection process. | 182 | necessary). This function returns the connection process. |
| 183 | 183 | ||
| 184 | The @var{nowait} parameter means that the scoket should be | ||
| 185 | asynchronous, and the connection process will be returned to the | ||
| 186 | caller before TLS negotiation has happened. | ||
| 187 | |||
| 184 | @lisp | 188 | @lisp |
| 185 | ;; open a HTTPS connection | 189 | ;; open a HTTPS connection |
| 186 | (open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https") | 190 | (open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https") |
| @@ -191,6 +195,12 @@ necessary). This function returns the connection process. | |||
| 191 | 195 | ||
| 192 | @end defun | 196 | @end defun |
| 193 | 197 | ||
| 198 | @findex gnutls-asynchronous-parameters | ||
| 199 | If called with @var{nowait}, the process is returned immediately | ||
| 200 | (before connecting to the server). In that case, the process object | ||
| 201 | is told what parameters to use when negotiating the connection | ||
| 202 | by using the @code{gnutls-asynchronous-parameters} function. | ||
| 203 | |||
| 194 | The function @code{gnutls-negotiate} is not generally useful and it | 204 | The function @code{gnutls-negotiate} is not generally useful and it |
| 195 | may change as needed, so please see @file{gnutls.el} for the details. | 205 | may change as needed, so please see @file{gnutls.el} for the details. |
| 196 | 206 | ||