def inner_loop
      return if @stop
      data = @socket.readpartial 4096
      return if data.nil? or data.empty?

      @driver.parse data
      @msg_queue.each {|msg| @driver.text msg}
      @msg_queue.clear
    end
def inner_loop
      return if @stop
      data = @socket.readpartial 4096
      return if data.nil? or data.empty?

      @driver.parse data
      @msg_queue.each {|msg| @driver.text msg}
      @msg_queue.clear
    end
All the polling work is done here