node-dns
node-dns copied to clipboard
Request should be able to take an existing Packet instead of creating a new one
Relays that forward questions from user to other resolver shouldn't have to spend CPU cycles recreating Packet objects. They should just be able to immediately forward them on to the other resolver (and then forward the response back to the requester).
This can be implemented by creating a constructor that takes an optional Packet. If given a Packet, then no copying of values is done, just perhaps recreating a proper _socket, or whatever is elegant.
Somewhat related to #67