client reads from stdin