Update of /project/cl-soap/cvsroot/cl-soap/src In directory common-lisp.net:/tmp/cvs-serv26398/src
Modified Files: http-client.lisp Log Message: renamed close to close-all-connections to prevent conflict function<>generic-function added open-socket-stream implementations for multiple CL implementations (from s-xml-rpc/sysdeps.lisp)
Date: Wed Sep 14 09:30:03 2005 Author: scaekenberghe
Index: cl-soap/src/http-client.lisp diff -u cl-soap/src/http-client.lisp:1.3 cl-soap/src/http-client.lisp:1.4 --- cl-soap/src/http-client.lisp:1.3 Fri Sep 9 13:21:16 2005 +++ cl-soap/src/http-client.lisp Wed Sep 14 09:30:02 2005 @@ -1,6 +1,6 @@ ;;;; -*- mode: lisp -*- ;;;; -;;;; $Id: http-client.lisp,v 1.3 2005/09/09 11:21:16 scaekenberghe Exp $ +;;;; $Id: http-client.lisp,v 1.4 2005/09/14 07:30:02 scaekenberghe Exp $ ;;;; ;;;; A basic HTTP client, somewhat API compatible with portableaserve's do-http-request ;;;; Copied from another project (basic authorization support removed) @@ -108,7 +108,7 @@ data)) server-state)))
-(defmethod close ((http-client-state http-client-state) &key abort) +(defmethod close-all-connections ((http-client-state http-client-state) &key abort) (with-slots (data) http-client-state (dolist (http-server-state data) @@ -118,7 +118,16 @@
(defun open-socket-stream (host port) #+lispworks (comm:open-tcp-stream host port) - #+openmcl (ccl:make-socket :remote-host host :remote-port port)) + #+openmcl (ccl:make-socket :remote-host host :remote-port port) + #+clisp (socket:socket-connect port host) + #+cmu (sys:make-fd-stream (ext:connect-to-inet-socket host port) :input t :output t :buffering :none) + #+sbcl (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp))) + (sb-bsd-sockets:socket-connect socket + (car + (sb-bsd-sockets:host-ent-addresses + (sb-bsd-sockets:get-host-by-name host))) + port) + (sb-bsd-sockets:socket-make-stream socket :element-type 'character :input t :output t :buffering :none)))
(defun get-open-connection (host port state &key force-new) (if state