Changed from socket.lines to socket.each_lines