;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The Lisp implementation interface functions that slime.lisp expects ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package :interface) #-ecl-sockets (progn (load "sys:sockets") (eval-when (:compile-toplevel :load-toplevel :execute) (push :ecl-sockets *features*))) (defun resolve-hostname (name) (car (sb-bsd-sockets:host-ent-addresses (sb-bsd-sockets:get-host-by-name name)))) (defimplementation connect-socket (host port) ; TODO "SBCL only right now - needs to be defimplementation like in Swank" (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp))) (sb-bsd-sockets:socket-connect socket (resolve-hostname host) port) socket)) (defimplementation make-socket-io-stream (socket) (let ((encoding :iso-8859-1)) (sb-bsd-sockets:socket-make-stream socket :output t :input t :element-type 'character #+sb-unicode :external-format #+sb-unicode encoding ))) #| (defun make-socket-io-stream (socket &optional (external-format :iso-latin-1-unix)) "SBCL only right now..." (let ((encoding (ecase external-format (:iso-latin-1-unix :iso-8859-1) #+sb-unicode (:utf-8-unix :utf-8)))) (sb-bsd-sockets:socket-make-stream socket :output t :input t :element-type 'character #+sb-unicode :external-format #+sb-unicode encoding ))) |#