#+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")
)
(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")
)
#+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")
)
sock :input t :output t :element-type 'base-char)
sock))
#+cmu
- (let ((sock (ext:connect-to-inet-socket host port)))
+ (let ((sock (ext:connect-to-inet-socket server port)))
(values
(sys:make-fd-stream sock :input t :output t :element-type 'base-char)
sock))
+ #+openmcl
+ (let ((sock (ccl:make-socket :remote-host server :remote-port port )))
+ (values sock sock))
)
(defun ipaddr-array-to-dotted (array)
#+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)
)