Created
January 22, 2017 08:43
-
-
Save zodmaner/84f9e61e4c4141bb927b71900e10f1e1 to your computer and use it in GitHub Desktop.
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
(defun start-simple-server (port) | |
"Listening on a port for a message, and print the received message." | |
(usocket:with-socket-listener (socket "127.0.0.1" port) | |
(usocket:wait-for-input socket) | |
(usocket:with-connected-socket (connection (usocket:socket-accept socket)) | |
(format t "~a~%" (read-line (usocket:socket-stream connection)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment