;; I expected this to work like the tcp-version below: (use srfi-1 srfi-18 tcp) (let loop () (if (char-ready?) (print "r: " (read-char)) (print "no char")) (thread-sleep! 1) (loop)) ;; if i type in abc in the terminal with the code above, ;; it reads the first 'a' and then waits for another return ;; before it reads the remaining bc. why? ;; This works like I expect it to: ;; entering 'abc' in a connected terminal ;; reads abc (let-values ([(i o) (tcp-accept (tcp-listen 1234))]) (let loop () (if (char-ready? i) (print "r: " (read-char i)) (print "no char")) (thread-sleep! 1) (loop)))