[plt-scheme] A problem about TCP program

From: Plato Wu (gtalk000 at gmail.com)
Date: Sun Jan 10 20:32:13 EST 2010

Thank you!

My Scheme code is like this:

(let-values (((server->me me->server)
             (tcp-connect "172.21.62.84" 11000)))
  (write (make-string  1024 #\z) me->server)
  (flush-output me->server)
  (display (read server->me))
  (close-input-port server->me)
  (close-output-port me->server))


It will hang in (read server->me), but if I replace flush-output with
close-output-port, it pass. I don't understand it, :(.





Posted on the users mailing list.