read-line returns eof when the port is closed, which is completely
different from sending byte 04 (or any other byte or sequence of bytes)
over the port.
;; set up {client,server}-{in,out} ports
(write-byte 4 client-out)
(flush-output client-out)
(read-byte server-in) ;; => 4
Hi all,
Quick question: Given a listener and input port defined thus:
(define listener (tcp-listen port))
(define-values (in out) (tcp-accept listener))
while reading lines of text, what’s the correct way to detect an EOT (^D or
U+0004) character?
This “obvious” solution does
2 matches
Mail list logo