@copying
This file describes the Emacs GnuTLS integration.
-Copyright @copyright{} 2012--2015 Free Software Foundation, Inc.
+Copyright @copyright{} 2012--2016 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
You should not have to use the @file{gnutls.el} functions directly.
But you can test them with @code{open-gnutls-stream}.
-@defun open-gnutls-stream name buffer host service
+@defun open-gnutls-stream name buffer host service &optional nowait
This function creates a buffer connected to a specific @var{host} and
@var{service} (port number or service name). The parameters and their
syntax are the same as those given to @code{open-network-stream}
Manual}). The connection process is called @var{name} (made unique if
necessary). This function returns the connection process.
+The @var{nowait} parameter means that the socket should be
+asynchronous, and the connection process will be returned to the
+caller before TLS negotiation has happened.
+
@lisp
;; open a HTTPS connection
(open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https")
@end defun
+@findex gnutls-asynchronous-parameters
+If called with @var{nowait}, the process is returned immediately
+(before connecting to the server). In that case, the process object
+is told what parameters to use when negotiating the connection
+by using the @code{gnutls-asynchronous-parameters} function.
+
The function @code{gnutls-negotiate} is not generally useful and it
may change as needed, so please see @file{gnutls.el} for the details.