-
Notifications
You must be signed in to change notification settings - Fork 165
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 global state for ICE TCP #254
Conversation
@Sean-Der I know we talked about how we should avoid |
62e1d37
to
8351df4
Compare
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
==========================================
- Coverage 80.50% 80.36% -0.14%
==========================================
Files 32 31 -1
Lines 2503 2450 -53
==========================================
- Hits 2015 1969 -46
+ Misses 349 342 -7
Partials 139 139
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Absolutely amazing, this is so exciting to see a red diff :) couple ideas/points (push back if you disagree)
|
Sounds good, will try to do it over the weekend! An alternative would be to make the pointer receiver methods check whether the pointer is nil, but I like your solution better. |
I think we will probably need a method that would allow us to close a TCP connection eventually. Something like: func (t *TCPMux) CloseConn(ufrag string, raddr net.Addr) error WDYT? |
This is something a user will need to do? Right now every gathered candidate gets closed internally, so sorry will check on my laptop soon :) |
No worries, I think I'm just getting a little confused :) So when I look at this statement from https://tools.ietf.org/html/rfc6544:
In the context of our host (listening tcp) candidate, does this mean we don't have to manually close the remote TCP connections? Is this because these (unselected) inbound TCP connections will actually be handled (closed) internally as remote candidates? |
I have addressed both of your points:
and I'm going to merge this since you already approved it. If you have any other concerns I'd be happy to push a fix later. I'll tag this release and push an update to |
This addresses a few points issue of #245:
net.Listener
instead of having global stateExpose aExpose anet.PacketConn
based API, Agentnet.TCPMux
based APIAlso, the unused
CloseChannel
was removed fromtcp_mux.go
.Closes #253.