tjfontaine / node-dns

Replacement dns module in pure javascript for node.js
MIT License
585 stars 154 forks source link

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

Open taoeffect opened 10 years ago

taoeffect commented 10 years ago

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 commented 10 years ago

Somewhat related to #67