diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-05-01 17:39:10 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-05-01 17:39:10 +0200 |
commit | 8de66e05c4b7de58d7bd091bda5674b2677fb6ad (patch) | |
tree | 281d615ec6710dc278306b876008e8906c682163 /lisp/net/network-stream.el | |
parent | 98a9a5d46cacabaa34d1bcdf52f586ce2bdc08ab (diff) | |
download | emacs-8de66e05c4b7de58d7bd091bda5674b2677fb6ad.tar.gz emacs-8de66e05c4b7de58d7bd091bda5674b2677fb6ad.tar.bz2 emacs-8de66e05c4b7de58d7bd091bda5674b2677fb6ad.zip |
(open-network-stream): Take a :nowait parameter and pass it on to `make-network-process'.
Diffstat (limited to 'lisp/net/network-stream.el')
-rw-r--r-- | lisp/net/network-stream.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 09519e14870..2071f790656 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -109,7 +109,10 @@ values: :starttls-function specifies a function for handling STARTTLS. This function should take one parameter, the response to the capability command, and should return the command to switch on - STARTTLS if the server supports STARTTLS, and nil otherwise." + STARTTLS if the server supports STARTTLS, and nil otherwise. + +:nowait is a boolean that says the connection should be made +asynchronously, if possible." (unless (featurep 'make-network-process) (error "Emacs was compiled without networking support")) (let ((type (plist-get parameters :type)) @@ -121,7 +124,8 @@ values: (plist-get parameters :capability-command)))))) ;; The simplest case: wrapper around `make-network-process'. (make-network-process :name name :buffer buffer - :host host :service service) + :host host :service service + :nowait (plist-get parameters :nowait)) (let ((work-buffer (or buffer (generate-new-buffer " *stream buffer*"))) (fun (cond ((eq type 'plain) 'network-stream-open-plain) @@ -150,10 +154,11 @@ values: (defun network-stream-open-plain (name buffer host service parameters) (let ((start (with-current-buffer buffer (point))) (stream (make-network-process :name name :buffer buffer - :host host :service service))) + :host host :service service + :nowait (plist-get parameters :nowait)))) (list stream (network-stream-get-response stream start - (plist-get parameters :end-of-command)) + (plist-get parameters :end-of-command)) nil 'plain))) |