-
Notifications
You must be signed in to change notification settings - Fork 56
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 a new interface transport.Net #204
Conversation
29009bf
to
d0cb708
Compare
@Sean-Der I fixed the CI warnings. Can you re-trigger the pipeline please? |
Codecov ReportBase: 84.63% // Head: 81.70% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #204 +/- ##
==========================================
- Coverage 84.63% 81.70% -2.93%
==========================================
Files 31 32 +1
Lines 2695 2750 +55
==========================================
- Hits 2281 2247 -34
- Misses 311 394 +83
- Partials 103 109 +6
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 at Codecov. |
Okay, yet another try please. I think this is ready to be merged @Sean-Der? |
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.
Changes look good to me. (just one question)
Before merging this, I'd like to discuss with you how we want to roll out this change. I personally feel we should bump a major version. We'd also need to think about how to update pion/ice and pion/webrtc. Any thoughts?
@enobufs I already drafted a bunch of dependent PRs for other Pion packages which will use the new Net interface. I will update those PRs once the v2 is released. |
@enobufs If there are other pending breaking changes, it would be nice to include them in v2.0.0. |
net/interface.go
Outdated
@@ -1,28 +1,20 @@ | |||
package vnet | |||
package net |
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 might be better to avoid using package name of stdlib.
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.
I think @at-wat has a good point.
I have thought about this for a while... I'd like to avoid vnet
for the interface package. How about transport
? I know it's 9 letters instead of 3, but it's "mostly" about transport layer and sounds right to me. It is also sort of promoting @stv0g 's "Net" interface to be the part of the primary package of this repo.
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.
@enobufs I agree :) I will implement this change
1648b2b
to
65d97ff
Compare
Hi @enobufs, I did some more work and moved the Net interface to the main package of the transport module.
|
More changes:
|
I did not realize earlier that this package had not even reached v1 yet. I am thinking about this work to be the release candidate as v1. (if necessary, we could create v0 (maintenance branch) if necessary (probably not). @at-wat @Sean-Der let me know if you have any thoughts/concerns. Once this landed on master, I will tag it as v1.0.0-beta to facilitate further work on pion/ice. |
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.
Great work! Are you able to rebase to fix the conflict? Other than that it looks good.
v0 may have breaking change without bumping major version according to the semantic versioning. |
True. We could just bump it to v0.14.0 for now, but this package should have v1 soon. |
With initial implementations by 'stdnet.Net' and 'vnet.Net'. This PR closes pion#34 and clearly separates the virtual network 'vnet.Net' from the code which is using in production. Furthermore this change allows users to provide their own 'net.Net' implementation for reasons like the one described in pion#34.
Only implemented for stdnet.Net so far.
Fix some errors found by golangci-lint
Add more interface getters to Net
Return error in vnet.NewNet()
Also abort tests early on fatal errors
Description
With two initial implementations
stdnet.Net
the functions from the standard librariesnet
packagevnet.Net
the virtual network for testingThis PR closes #34 and clearly separates the virtual network 'vnet.Net' from the code
which is using in production. Furthermore this change allows users to provide their own
transport.Net
implementation for reasons like the one described in #34.This PR changes some of the core API for this package, why we might consider bumping it to v2.
I have also prepared associated PRs for pion/ice as well as pion/turn which will be linked here shortly.
Reference issue
Closes #34
Closes #207
Closes #168