def next_msg
      data = ""
      crlf = "\r\n"
      left = 1024 # 1024 byte, no idea if it's ever getting bigger
      while left > 0
        buf = @socket.read(left > 1 ? 1 : left)
        break if buf.nil?
        left -= buf.bytesize
        data += buf
        break if data.include? crlf # crlf means line finished, the TCP socket keeps on listening, so we break
      end
      readline = data.chomp.split(" ")
      DBus.logger.debug "readline: #{readline.inspect}"
      readline
    end
def next_msg
      data = ""
      crlf = "\r\n"
      left = 1024 # 1024 byte, no idea if it's ever getting bigger
      while left > 0
        buf = @socket.read(left > 1 ? 1 : left)
        break if buf.nil?
        left -= buf.bytesize
        data += buf
        break if data.include? crlf # crlf means line finished, the TCP socket keeps on listening, so we break
      end
      readline = data.chomp.split(" ")
      DBus.logger.debug "readline: #{readline.inspect}"
      readline
    end
Read data (a buffer) from the bus until CR LF is encountered.
 Return the buffer without the CR LF characters.