let printer _ r _ =
(* In the previous chapter, we saw how to interact with readers and writers
* using files and stdin. Now we're dealing with TCP conncetions, but
* nothing's changed. We read a line from a TCP connection the same way we
* read a line from a file or from stdin! This means we don't have to learn
* anything new in order to be familiar with network programming in OCaml. *)
Reader.read_line r >>| function
| `Eof -> print_endline "error"
| `Ok s -> print_endline s