-
-
Save adlai/ca2c80c9a4b8079be1d604b518c4a6e5 to your computer and use it in GitHub Desktop.
SLIME+CCL socket example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; then, append these to your initfile: | |
(format t "~&Where to listen for swank? (blank = none) ") | |
(finish-output) | |
(let* ((answer (read-line)) | |
(number (parse-integer answer :junk-allowed t))) | |
(cond | |
(number (swank:create-server :port number :dont-close t)) | |
((string/= answer "") (swank:create-server :port answer :dont-close t)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; first, edit two of the functions in swank/ccl.lisp, to this: | |
(defimplementation create-socket (host port &key backlog) | |
(multiple-value-call #'ccl:make-socket | |
:connect :passive :local-host host :backlog (or backlog 5) | |
(if (typep port 'integer) (values :reuse-address t :local-port port) | |
(values :local-filename port :address-family :file)))) | |
(defimplementation local-port (socket) (defimplementation local-port (socket) | |
(or (ccl:local-port socket) (ccl:local-filename socket))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment