def open
      begin
        begin
          with_timeout do
            @socket = TCPSocket.new(@host, @port)
            @socket.sync = true
            welcome = @socket.gets
            unless welcome =~ /^# munin node at/
              raise Munin::AccessDenied
            end
            @connected = true
          end
        rescue Timeout::Error
          raise Munin::ConnectionError, "Timed out talking to #{@host}"
        end
      rescue Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET => ex
        raise Munin::ConnectionError, ex.message
      rescue EOFError
        raise Munin::AccessDenied
      rescue Exception => ex
        raise Munin::ConnectionError, ex.message
      end
    end
def open
      begin
        begin
          with_timeout do
            @socket = TCPSocket.new(@host, @port)
            @socket.sync = true
            welcome = @socket.gets
            unless welcome =~ /^# munin node at/
              raise Munin::AccessDenied
            end
            @connected = true
          end
        rescue Timeout::Error
          raise Munin::ConnectionError, "Timed out talking to #{@host}"
        end
      rescue Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET => ex
        raise Munin::ConnectionError, ex.message
      rescue EOFError
        raise Munin::AccessDenied
      rescue Exception => ex
        raise Munin::ConnectionError, ex.message
      end
    end
Establish connection to the server