node-dns icon indicating copy to clipboard operation
node-dns copied to clipboard

Request should be able to take an existing Packet instead of creating a new one

Open taoeffect opened this issue 11 years ago • 1 comments

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.

taoeffect avatar Apr 23 '14 22:04 taoeffect

Somewhat related to #67

taoeffect avatar Apr 25 '14 18:04 taoeffect