Class: RubyDNS::UDPHandler

Inherits:
UDPSocketHandler show all
Defined in:
lib/rubydns/handler.rb

Instance Method Summary collapse

Methods inherited from UDPSocketHandler

#handle_connection, #respond, #run

Methods inherited from GenericHandler

#error_response, #process_query

Constructor Details

#initialize(server, host, port) ⇒ UDPHandler

Returns a new instance of UDPHandler.



126
127
128
129
130
131
# File 'lib/rubydns/handler.rb', line 126

def initialize(server, host, port)
	socket = UDPSocket.new
	socket.bind(host, port)
	
	super(server, socket)
end

Instance Method Details

#finalizeObject



135
136
137
# File 'lib/rubydns/handler.rb', line 135

def finalize
	@socket.close if @socket
end