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

Support unicast query and answer #176

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Conversation

edaniels
Copy link
Member

@edaniels edaniels commented Feb 8, 2024

This also ends up internally supporting a good chunk of IPv6

@edaniels edaniels requested a review from enobufs February 8, 2024 02:13
@edaniels
Copy link
Member Author

edaniels commented Feb 8, 2024

Blocked on #173

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 80 lines in your changes are missing coverage. Please review.

Comparison is base (3ef9864) 60.92% compared to head (278c137) 62.14%.

Files Patch % Lines
conn.go 67.21% 54 Missing and 26 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
+ Coverage   60.92%   62.14%   +1.22%     
==========================================
  Files           1        1              
  Lines         412      597     +185     
==========================================
+ Hits          251      371     +120     
- Misses        125      170      +45     
- Partials       36       56      +20     
Flag Coverage Δ
go 62.14% <67.21%> (+1.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edaniels edaniels force-pushed the unicast_support branch 3 times, most recently from f56a681 to f1ac998 Compare February 8, 2024 13:59
@edaniels edaniels requested review from SimonVerkada and removed request for enobufs February 8, 2024 19:27
Copy link
Contributor

@SimonVerkada SimonVerkada left a comment

Choose a reason for hiding this comment

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

Looks good to me, small comments to consider

conn.go Outdated Show resolved Hide resolved
conn.go Outdated Show resolved Hide resolved
conn.go Outdated Show resolved Hide resolved
conn.go Outdated Show resolved Hide resolved
Comment on lines +825 to +832
for i := 0; i < numReaders; i++ {
<-readerStarted
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could achieve something similar with sync.waitGroup

Copy link
Member Author

Choose a reason for hiding this comment

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

so I was thinking that but didn't feel like bothering with the race condition panics around waitgroups

@SimonVerkada
Copy link
Contributor

Also, should consider adding additional unit tests

@edaniels
Copy link
Member Author

edaniels commented Feb 8, 2024

I'd love to add more unit tests, but I'm not really sure how to do that succinctly without getting very in the weeds with capturing the DNS packets or injecting in the unicast sockets. I'm open to suggestions for future PRs though!

@edaniels edaniels merged commit dc39736 into pion:master Feb 8, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Querying does not work for cases when advertising is delegated to another host.
2 participants