-
Notifications
You must be signed in to change notification settings - Fork 319
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
Remove dependency on transport.Net from client #276
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #276 +/- ##
==========================================
- Coverage 67.94% 67.91% -0.03%
==========================================
Files 39 39
Lines 2505 2475 -30
==========================================
- Hits 1702 1681 -21
+ Misses 668 662 -6
+ Partials 135 132 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
This PR removes the vnet from the TURN client and passes TURN/STUN server addresses as
net.Addr
's directly.
I also prefer passing a resolvednet.Addr
instead of doing the address resolution insideNewClient
.
Sounds reasonable to me, but I haven't worked on this repository.
It would be better to ask @Sean-Der or @enobufs for review.
35e7ee2
to
4a6d0ec
Compare
It appears the latest tag is v2.1.0. I believe this is going to be v3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Leaving a comment out-of-the-scope for this PR:
It's little hard to do re-review since the PR contains cosmetic changes and also rebased since the last view.
(No problem on this PR as we only use rebase-merge mode and the commit of cosmetic changes is properly separated from the main commit)
GitHub web UI shows witch files are changed since the last review if PR branch is not rebased.
It might be better to discuss to switch to the squash-merge mode to allow having intermediate commits in PRs.
Thanks @enobufs for the review. Maybe lets for a few more API breaking changes before we make this a v3. There is a slightly related PR in pion/stun#134, which introduces a new Do you have an opinion on that?
Sorry for this. I will do such changes in a separated PR in the future. |
Remove dependency on transport.Net from client
Fix types and comment capitalization
I think this would be a nice addition that would make the life of people that just want a quick TURN client connection a lot more easier. Currently it takes some 70 lines of code in the UDP example to create the socket, set up the I'm wondering though how to pass the realm and the TURN credentials in to the |
This PR removes the vnet from the TURN client and passes TURN/STUN server addresses as
net.Addr
's directly.I also prefer passing a resolved
net.Addr
instead of doing the address resolution insideNewClient
.I currently do not see a reason why the TURN client needs to have a knowledge about the vnet as we already pass a
net.Conn
to the client.This makes the API a lot simpler and more similiar to the pion/stun module which does not use the vnet at all.
If possible, I would even try to remove any reference to vnet from pion/turn completely.
This PR will change the API and hence should bump the module to v2
What do you think?