aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/url/url-gw.el
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2006-10-27 14:44:25 +0000
committerChong Yidong <[email protected]>2006-10-27 14:44:25 +0000
commit5695d1dd75e567a73904123a175244ff1b9c1ff1 (patch)
treea225f673a3122877c115431f4cc9ac83243c8c7c /lisp/url/url-gw.el
parentd32f600dfcda95e50f6966d38a1d9c239902fb85 (diff)
* url-http.el (url-http-mark-connection-as-free): Verify that
connection is open before saving it. (url-http-handle-authentication): Use url-retrieve-internal instead of url-retrieve. (url-http-parse-headers): Adapt to new callback interface. (url-http): Handle non-blocking connections. (url-http-async-sentinel): Create. * url.el (url-retrieve): Update docstring for new callback interface. Remove all code. (url-retrieve-internal): Move code from url-retrieve here. * url-gw.el (url-open-stream): Use a non-blocking socket for `native' gateway method, if available.
Diffstat (limited to 'lisp/url/url-gw.el')
-rw-r--r--lisp/url/url-gw.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 878259927e..31e1a629ab 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -210,7 +210,8 @@ linked Emacs under SunOS 4.x"
(defun url-open-stream (name buffer host service)
"Open a stream to HOST, possibly via a gateway.
Args per `open-network-stream'.
-Will not make a connection if `url-gateway-unplugged' is non-nil."
+Will not make a connection if `url-gateway-unplugged' is non-nil.
+Might do a non-blocking connection; use `process-status' to check."
(unless url-gateway-unplugged
(let ((gw-method (if (and url-gateway-local-host-regexp
(not (eq 'tls url-gateway-method))
@@ -249,7 +250,11 @@ Will not make a connection if `url-gateway-unplugged' is non-nil."
(ssl
(open-ssl-stream name buffer host service))
((native)
- (open-network-stream name buffer host service))
+ ;; Use non-blocking socket if we can.
+ (make-network-process :name name :buffer buffer
+ :host host :service service
+ :nowait
+ (and nil (featurep 'make-network-process '(:nowait t)))))
(socks
(socks-open-network-stream name buffer host service))
(telnet