Class: Celluloid::DNS::UDPHandler

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

Instance Method Summary collapse

Methods inherited from UDPSocketHandler

#handle_connection, #respond, #run

Methods inherited from GenericHandler

#error_response, #process_query, #stop

Constructor Details

#initialize(server, host, port) ⇒ UDPHandler

Returns a new instance of UDPHandler.



142
143
144
145
146
147
148
149
# File 'lib/celluloid/dns/handler.rb', line 142

def initialize(server, host, port)
	family = Celluloid::DNS::address_family(host)
	socket = UDPSocket.new(family)
	
	socket.bind(host, port)
	
	super(server, socket)
end