Class: Resolv::DNS::Requester::UnconnectedUDP::Sender

Inherits:
Sender
  • Object
show all
Defined in:
lib/resolv.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, data, sock, host, port) ⇒ Sender

Returns a new instance of Sender.



789
790
791
792
793
# File 'lib/resolv.rb', line 789

def initialize(msg, data, sock, host, port)
  super(msg, data, sock)
  @host = host
  @port = port
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data



794
795
796
# File 'lib/resolv.rb', line 794

def data
  @data
end

Instance Method Details

#sendObject



796
797
798
799
# File 'lib/resolv.rb', line 796

def send
  raise "@sock is nil." if @sock.nil?
  @sock.send(@msg, 0, @host, @port)
end