 parallel = require('run-parallel')
 string2compact = require('string2compact')
 utils = require './utils'
+FindNodeQueryHandler = require "./src/queryhandlers/FindNodeQueryHandler"
+PingQueryHandler = require "./src/queryhandlers/PingQueryHandler"
 
 #
 # Constants
+# TODO move them to a `constants.coffee` or make them configurable
 #
 
 BOOTSTRAP_NODES = [

  @_query { q: 'ping' }, addr, cb

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

DHT::_onPing = (addr, message) ->
  res =
    t: message.t
    y: MESSAGE_TYPE.RESPONSE
    r: id: @nodeId
  @_debug 'got ping from %s', addr
  @_send addr, res

###*
# Send "find_node" query to given addr.
# @param {string} addr
# @param {Buffer} nodeId

    cb null, res

  @_query data, addr, onResponse

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