reordered write/read operations to respond more quickly to client disconnect

The original order only responded to a client disconnect when the server attempted to write to the connection, which could be minutes or longer. This new order of WriteLinesFrom followed by ReadLinesInto responds to a client disconnect instantly.