From: Kevin M. Rosenberg Date: Tue, 25 May 2004 05:41:37 +0000 (+0000) Subject: r9468: add sockets for openmcl X-Git-Tag: v1.96~73 X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=commitdiff_plain;h=f7bbc3121376b8805c6efe808dee8c71cbe327f6 r9468: add sockets for openmcl --- diff --git a/debian/changelog b/debian/changelog index e95bcf5..7d1403a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-kmrcl (1.71-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Mon, 24 May 2004 23:41:19 -0600 + cl-kmrcl (1.70-1) unstable; urgency=low * New upstream diff --git a/sockets.lisp b/sockets.lisp index 74fa27e..5bcc7cb 100644 --- a/sockets.lisp +++ b/sockets.lisp @@ -46,7 +46,10 @@ setsockopt SO_REUSEADDR if :reuse is not nil" #+sbcl (listen-to-inet-port :port port :reuse reuse-address) #+clisp (ext:socket-server port) - #-(or allegro clisp cmu sbcl) + #+openmcl + (ccl:make-socket :connect :passive :local-port port + :reuse-address reuse-address) + #-(or allegro clisp cmu sbcl openmcl) (warn "create-inet-listener not supported on this implementation") ) @@ -83,7 +86,10 @@ setsockopt SO_REUSEADDR if :reuse is not nil" (sb-bsd-sockets:socket-make-stream sock :element-type 'base-char :input t :output t) sock))) - #-(or allegro clisp cmu sbcl) + #+openmcl + (let ((sock (ccl:accept-connection listener :wait t))) + (values sock sock)) + #-(or allegro clisp cmu sbcl openmcl) (warn "accept-tcp-connection not supported on this implementation") ) @@ -102,7 +108,8 @@ setsockopt SO_REUSEADDR if :reuse is not nil" #+cmu (unix:unix-close socket) #+sbcl (sb-unix:unix-close (sb-bsd-sockets:socket-file-descriptor socket)) - #-(or allegro clisp cmu sbcl) + #+openmcl (close socket) + #-(or allegro clisp cmu sbcl openmcl) (warn "close-passive-socket not supported on this implementation") ) @@ -176,6 +183,9 @@ setsockopt SO_REUSEADDR if :reuse is not nil" (values (sys:make-fd-stream sock :input t :output t :element-type 'base-char) sock)) + #+openmcl + (let ((sock (ccl:make-socket :remote-host host :remote-port port ))) + (values sock sock)) ) (defun ipaddr-array-to-dotted (array) @@ -190,5 +200,6 @@ setsockopt SO_REUSEADDR if :reuse is not nil" #+sbcl (ipaddr-array-to-dotted (nth-value 0 (sb-bsd-sockets:socket-peername socket))) #+cmu (nth-value 0 (ext:get-peer-host-and-port socket)) + #+openmcl (ccl:remote-host socket) )