Modify client to select on stdin and server socket