Last active
August 29, 2015 14:24
-
-
Save zkat/4611 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 get-input-from-client (client) | |
(let* ((stream (usocket:socket-stream (socket client))) | |
(collected-bytes (loop with b | |
do (setf b (read-byte stream)) | |
until (= b (char-code #\Newline)) | |
unless (not (standard-char-p (code-char b))) | |
collect (code-char b)))) | |
(coerce collected-bytes 'string))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment