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

Add udp connection reuse #153

Merged
merged 2 commits into from
Aug 10, 2023
Merged

Add udp connection reuse #153

merged 2 commits into from
Aug 10, 2023

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Aug 1, 2023

Closes #116

Example code:

rdnsClient, err := retryabledns.NewWithOptions(retryabledns.Options{
		BaseResolvers:         []string{"192.168.5.1:53", "8.8.8.8:53"},
		MaxRetries:            1,
		ConnectionPoolThreads: 10, // To enable connection pool
	})
if err != nil {
	log.Fatal(err)
}
defer rdnsClient.Close()
_, err := rdnsClient.QueryMultiple("example.com", []uint16{dns.TypeA})
if err != nil {
	log.Fatal(err)
}

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Aug 1, 2023
@Mzack9999 Mzack9999 self-assigned this Aug 1, 2023
@Mzack9999 Mzack9999 marked this pull request as ready for review August 7, 2023 15:26
Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

@ehsandeep ehsandeep merged commit cad4507 into main Aug 10, 2023
5 checks passed
@ehsandeep ehsandeep deleted the feat-116-conn-reuse branch August 10, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate UDP socket reuse
3 participants