Reading/writing null-terminated strings from socket
I would accumulate bytes instead of integers.

(define (read-c-str inp)
  (define (read-to-zero acc)
    (define b (read-byte inp))
    (if (equal? b 0)
        (blist-&gt;string acc)
        (read-to-zero (bytes-append acc (bytes b)))))
  (read-to-zero #""))


And change blist-&gt;string accordingly.

Edit: in this case blist-&gt;string will become just bytes-&gt;string/utf-8 .