Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional setting is optional #6

Closed
rdlowrey opened this issue Jul 17, 2014 · 1 comment
Closed

Optional setting is optional #6

rdlowrey opened this issue Jul 17, 2014 · 1 comment

Comments

@rdlowrey
Copy link
Contributor

My life would be eased if it were possible to set the following options on Addr\Client after instantiation and not require them in the constructor:

  • $socketAddr
  • $socketPort
  • $requestTimeout

Instances can function perfectly well with default values. More importantly, though, the Client class is generally going to be a dependency of other classes and so must be injected. By allowing at least $requestTimeout to be modified after instantiation the classes that are composed of Client instances can expose the option to modify DNS resolution timeouts.

I realize that clients currently open a UDP connection at instantiation time and hold that for the life of the object. As a result, allowing the address values to be modified would add some logic to the current code.

DaveRandom added a commit that referenced this issue Jul 17, 2014
@DaveRandom
Copy link
Contributor

Changing the server in use will be implemented as part of #4. I haven't worked out what the best way to do this would be yet, ideas are welcome.

peter279k pushed a commit to peter279k/dns that referenced this issue Dec 7, 2020
Add support for setting a specific nameserver to resolve the DNS query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants