send newlines in tcp2 chat client

This commit is contained in:
Sam Caldwell 2019-01-18 13:56:26 -05:00
parent c7d78159e3
commit 36420274cb
1 changed files with 3 additions and 1 deletions

View File

@ -13,4 +13,6 @@
(define stdin-evt (read-bytes-line-evt (current-input-port) 'any))
(stop-when (message (inbound (external-event stdin-evt (list (? eof-object? _))))))
(on (message (inbound (external-event stdin-evt (list (? bytes? $line)))))
(send! (tcp-out id line))))
(send! (tcp-out id line))
;; chat-tcp2 uses the line-reader, so need line separators.
(send! (tcp-out id #"\n"))))