in reply to Why won't this read?

\r is not the End Of Line. The Server gets your command after it has received EOF because EOL is missing. *Then* it does it's answer. But EOF is sent when the Client terminates which has the unfortunate effect that a terminated Client can't read anything.