     @_port = null
 
     ###*
-    # Query Handlers table
-    # @type {Object} string -> function
-    ###
-
-    @queryHandler =
-      ping: @_onPing
-      find_node: @_onFindNode
-
-    ###*
     # Routing table
     # @type {KBucket}
     ###

    cb null, res

  @_query data, addr, onResponse

###*
# Called when another node sends a "find_node" query.
# @param  {string} addr
# @param  {Object} message
###

DHT::_onFindNode = (addr, message) ->
  nodeId = message.a and message.a.target
  if !nodeId
    errMessage = '`find_node` missing required `a.target` field'
    @_debug errMessage
    @_sendError addr, message.t, ERROR_TYPE.PROTOCOL, errMessage
  @_debug 'got find_node %s from %s', utils.idToHexString(nodeId), addr
  # Convert nodes to "compact node info" representation
  nodes = utils.convertToNodeInfo(@nodes.closest({ id: nodeId }, K))
  res =
    t: message.t
    y: MESSAGE_TYPE.RESPONSE
    r:
      id: @nodeId
      nodes: nodes
  @_send addr, res

###*
# Send an error to given host and port.


DHT::_onQuery = (addr, message) ->
  query = message.q.toString()
  handler = @queryHandler[query]
  @_debug "handler:", handler.name
  if typeof handler == "object"
    return handler.handle message
  else
    throw new TypeError "unexpected query type"

###*
# Called when another node sends a response or error.
