comparison lisp/url/url-gw.el @ 73501:437fb645afb4

* 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.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 27 Oct 2006 14:44:25 +0000
parents 07c1b5999e53
children 61352a6a6dcf 034f67f59091
comparison
equal deleted inserted replaced
73500:d25ce2f322cb 73501:437fb645afb4
208 208
209 ;;;###autoload 209 ;;;###autoload
210 (defun url-open-stream (name buffer host service) 210 (defun url-open-stream (name buffer host service)
211 "Open a stream to HOST, possibly via a gateway. 211 "Open a stream to HOST, possibly via a gateway.
212 Args per `open-network-stream'. 212 Args per `open-network-stream'.
213 Will not make a connection if `url-gateway-unplugged' is non-nil." 213 Will not make a connection if `url-gateway-unplugged' is non-nil.
214 Might do a non-blocking connection; use `process-status' to check."
214 (unless url-gateway-unplugged 215 (unless url-gateway-unplugged
215 (let ((gw-method (if (and url-gateway-local-host-regexp 216 (let ((gw-method (if (and url-gateway-local-host-regexp
216 (not (eq 'tls url-gateway-method)) 217 (not (eq 'tls url-gateway-method))
217 (not (eq 'ssl url-gateway-method)) 218 (not (eq 'ssl url-gateway-method))
218 (string-match 219 (string-match
247 (tls 248 (tls
248 (open-tls-stream name buffer host service)) 249 (open-tls-stream name buffer host service))
249 (ssl 250 (ssl
250 (open-ssl-stream name buffer host service)) 251 (open-ssl-stream name buffer host service))
251 ((native) 252 ((native)
252 (open-network-stream name buffer host service)) 253 ;; Use non-blocking socket if we can.
254 (make-network-process :name name :buffer buffer
255 :host host :service service
256 :nowait
257 (and nil (featurep 'make-network-process '(:nowait t)))))
253 (socks 258 (socks
254 (socks-open-network-stream name buffer host service)) 259 (socks-open-network-stream name buffer host service))
255 (telnet 260 (telnet
256 (url-open-telnet name buffer host service)) 261 (url-open-telnet name buffer host service))
257 (rlogin 262 (rlogin