Resolv::DNS::Requester (Class)

In: resolv.rb
Parent: Object

Methods

close   delete   new  

Public Class methods

[Source]

# File resolv.rb, line 526
      def initialize
        @senders = {}
      end

Public Instance methods

[Source]

# File resolv.rb, line 530
      def close
        thread, sock, @thread, @sock = @thread, @sock
        begin
          if thread
            thread.kill
            thread.join
          end
        ensure
          sock.close if sock
        end
      end

[Source]

# File resolv.rb, line 542
      def delete(arg)
        case arg
        when Sender
          @senders.delete_if {|k, s| s == arg }
        when Queue
          @senders.delete_if {|k, s| s.queue == arg }
        else
          raise ArgumentError.new("neither Sender or Queue: #{arg}")
        end
      end

[Validate]