Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Issue 2063823008: Adding IceConfig option to assume TURN/TURN candidate pairs will work. (Closed)

Created:
4 years, 6 months ago by Taylor Brandstetter
Modified:
4 years, 6 months ago
Reviewers:
honghaiz3, pthatcher1
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Adding IceConfig option to assume TURN/TURN candidate pairs will work. This will allow media to be sent on these pairs before a binding response is received, shortening call setup time. However, this is only possible if the TURN servers don't require CreatePermission when communicating with each other. R=honghaiz@webrtc.org, pthatcher@webrtc.org NOTRY=True Committed: https://crrev.com/14f97f5bc65f2319642719d5a061a3747f586bb7 Cr-Commit-Position: refs/heads/master@{#13268}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Formatting. #

Total comments: 43

Patch Set 3 : Responding to comments. Doing "presumed writable" determination in Connection. #

Total comments: 25

Patch Set 4 : Rename IceConfig option and fix transition to STATE_WRITE_UNRELIABLE. #

Total comments: 1

Patch Set 5 : Changing write state comparison back to how it was originally. #

Patch Set 6 : Demonstrating another solution that doesn't require 2 enums. #

Total comments: 3

Patch Set 7 : Improving code readability. #

Total comments: 3

Patch Set 8 : Fixing "presumed writable" vs "unreliable" comparison. #

Patch Set 9 : Adding unit test and merging with master. #

Patch Set 10 : Merge with master again.. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+787 lines, -674 lines) Patch
M webrtc/api/webrtcsession_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.h View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -0 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.cc View 1 2 3 4 5 6 7 8 9 9 chunks +197 lines, -157 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel_unittest.cc View 1 2 3 4 5 6 7 8 9 91 chunks +562 lines, -513 lines 0 comments Download
M webrtc/p2p/base/port.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M webrtc/p2p/base/transport.h View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 48 (12 generated)
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/1/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/1/webrtc/p2p/base/p2ptransportchannel.cc#newcode970 webrtc/p2p/base/p2ptransportchannel.cc:970: return -1; This is the only difference from the ...
4 years, 6 months ago (2016-06-14 22:25:27 UTC) #2
honghaiz3
https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc#newcode958 webrtc/p2p/base/p2ptransportchannel.cc:958: return MAPPED_WRITE_STATE_TIMEOUT; Should we consider putting the write state ...
4 years, 6 months ago (2016-06-15 16:37:18 UTC) #3
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc#newcode958 webrtc/p2p/base/p2ptransportchannel.cc:958: return MAPPED_WRITE_STATE_TIMEOUT; On 2016/06/15 16:37:18, honghaiz3 wrote: > Should ...
4 years, 6 months ago (2016-06-15 17:08:56 UTC) #4
pthatcher1
Mostly just style stuff. The only thing I feel strongly about is avoiding an extra ...
4 years, 6 months ago (2016-06-15 19:12:47 UTC) #5
honghaiz3
https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc#newcode958 webrtc/p2p/base/p2ptransportchannel.cc:958: return MAPPED_WRITE_STATE_TIMEOUT; On 2016/06/15 19:12:46, pthatcher1 wrote: > On ...
4 years, 6 months ago (2016-06-15 19:26:36 UTC) #6
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc#newcode314 webrtc/p2p/base/p2ptransportchannel.cc:314: } On 2016/06/15 19:12:46, pthatcher1 wrote: > Why not ...
4 years, 6 months ago (2016-06-16 00:13:41 UTC) #7
pthatcher1
https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/20001/webrtc/p2p/base/p2ptransportchannel.cc#newcode1031 webrtc/p2p/base/p2ptransportchannel.cc:1031: } On 2016/06/16 00:13:40, Taylor Brandstetter wrote: > On ...
4 years, 6 months ago (2016-06-16 23:31:36 UTC) #8
honghaiz3
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.h File webrtc/p2p/base/port.h (right): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.h#newcode459 webrtc/p2p/base/port.h:459: bool presumed_writable() const { When do we need to ...
4 years, 6 months ago (2016-06-17 01:55:03 UTC) #9
honghaiz3
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc#newcode855 webrtc/p2p/base/port.cc:855: write_state_ = InitialWriteState(); Instead of setting the write_state_ every ...
4 years, 6 months ago (2016-06-17 16:22:07 UTC) #10
honghaiz3
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (left): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc#oldcode169 webrtc/p2p/base/p2ptransportchannel.cc:169: }; I think you don't need to put anything ...
4 years, 6 months ago (2016-06-17 16:28:17 UTC) #11
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (left): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc#oldcode169 webrtc/p2p/base/p2ptransportchannel.cc:169: }; On 2016/06/17 16:28:16, honghaiz3 wrote: > I think ...
4 years, 6 months ago (2016-06-20 17:15:45 UTC) #12
honghaiz3
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (left): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc#oldcode169 webrtc/p2p/base/p2ptransportchannel.cc:169: }; On 2016/06/20 17:15:45, Taylor Brandstetter wrote: > On ...
4 years, 6 months ago (2016-06-20 22:31:03 UTC) #13
pthatcher1
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (left): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/p2ptransportchannel.cc#oldcode169 webrtc/p2p/base/p2ptransportchannel.cc:169: }; On 2016/06/20 22:31:03, honghaiz3 wrote: > On 2016/06/20 ...
4 years, 6 months ago (2016-06-21 06:20:50 UTC) #14
honghaiz3
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc#newcode855 webrtc/p2p/base/port.cc:855: write_state_ = InitialWriteState(); On 2016/06/21 06:20:50, pthatcher1 wrote: > ...
4 years, 6 months ago (2016-06-21 19:37:57 UTC) #15
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc#newcode855 webrtc/p2p/base/port.cc:855: write_state_ = InitialWriteState(); On 2016/06/21 06:20:50, pthatcher1 wrote: > ...
4 years, 6 months ago (2016-06-22 00:37:07 UTC) #16
pthatcher1
I think it's mostly just a style/readability decision at this point. The only thing really ...
4 years, 6 months ago (2016-06-22 05:46:14 UTC) #17
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc#newcode855 webrtc/p2p/base/port.cc:855: write_state_ = InitialWriteState(); On 2016/06/22 05:46:13, pthatcher1 wrote: > ...
4 years, 6 months ago (2016-06-22 15:34:44 UTC) #18
Taylor Brandstetter
On 2016/06/22 15:34:44, Taylor Brandstetter wrote: > https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc > File webrtc/p2p/base/port.cc (right): > > https://codereview.webrtc.org/2063823008/diff/40001/webrtc/p2p/base/port.cc#newcode855 ...
4 years, 6 months ago (2016-06-22 15:52:37 UTC) #19
pthatcher1
lgtm https://codereview.webrtc.org/2063823008/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc#newcode947 webrtc/p2p/base/p2ptransportchannel.cc:947: } To go along with the write state ...
4 years, 6 months ago (2016-06-22 16:08:25 UTC) #20
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc#newcode947 webrtc/p2p/base/p2ptransportchannel.cc:947: } On 2016/06/22 16:08:24, pthatcher1 wrote: > To go ...
4 years, 6 months ago (2016-06-22 16:18:28 UTC) #21
honghaiz3
https://codereview.webrtc.org/2063823008/diff/120001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/120001/webrtc/p2p/base/p2ptransportchannel.cc#newcode941 webrtc/p2p/base/p2ptransportchannel.cc:941: if (b->write_state() < a->write_state()) { I am not sure ...
4 years, 6 months ago (2016-06-22 16:48:01 UTC) #22
Taylor Brandstetter
https://codereview.webrtc.org/2063823008/diff/120001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/120001/webrtc/p2p/base/p2ptransportchannel.cc#newcode941 webrtc/p2p/base/p2ptransportchannel.cc:941: if (b->write_state() < a->write_state()) { On 2016/06/22 16:48:01, honghaiz3 ...
4 years, 6 months ago (2016-06-22 17:15:47 UTC) #23
pthatcher1
https://codereview.webrtc.org/2063823008/diff/120001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2063823008/diff/120001/webrtc/p2p/base/p2ptransportchannel.cc#newcode941 webrtc/p2p/base/p2ptransportchannel.cc:941: if (b->write_state() < a->write_state()) { On 2016/06/22 17:15:46, Taylor ...
4 years, 6 months ago (2016-06-22 17:20:19 UTC) #24
honghaiz3
lgtm
4 years, 6 months ago (2016-06-22 20:17:34 UTC) #25
Taylor Brandstetter
Only adding "NOTRY" because Android bots are currently failing a "get version" step.
4 years, 6 months ago (2016-06-22 22:43:04 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2063823008/160001
4 years, 6 months ago (2016-06-22 22:43:51 UTC) #30
commit-bot: I haz the power
Failed to apply patch for webrtc/p2p/base/p2ptransportchannel_unittest.cc: While running git apply --index -3 -p1; error: patch ...
4 years, 6 months ago (2016-06-22 22:45:30 UTC) #32
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/8e6134eae4117a239de67c9a9dae8f5e3235d803 Cr-Commit-Position: refs/heads/master@{#13263}
4 years, 6 months ago (2016-06-22 23:02:04 UTC) #34
honghaiz3
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.webrtc.org/2090823002/ by honghaiz@webrtc.org. ...
4 years, 6 months ago (2016-06-22 23:08:28 UTC) #35
Taylor Brandstetter
Honghai and I landed CLs at the same time and they slightly conflicted. I merged ...
4 years, 6 months ago (2016-06-22 23:35:33 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2063823008/180001
4 years, 6 months ago (2016-06-23 00:12:42 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 6 months ago (2016-06-23 00:14:20 UTC) #43
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/14f97f5bc65f2319642719d5a061a3747f586bb7 Cr-Commit-Position: refs/heads/master@{#13268}
4 years, 6 months ago (2016-06-23 00:14:27 UTC) #45
honghaiz3
On 2016/06/23 00:14:27, commit-bot: I haz the power wrote: > Patchset 10 (id:??) landed as ...
4 years, 6 months ago (2016-06-24 17:26:38 UTC) #46
pthatcher1
Good catch. Having that check inside of ProxyConnection::Send seems kind of strange to me anyway, ...
4 years, 6 months ago (2016-06-24 17:42:04 UTC) #47
Taylor Brandstetter
4 years, 6 months ago (2016-06-24 18:18:26 UTC) #48
Message was sent while issue was closed.
On 2016/06/24 17:42:04, pthatcher1 wrote:
> Good catch.
> 
> Having that check inside of ProxyConnection::Send seems kind of strange to me
> anyway, especially since the only thing that calls it is
> P2PTransportChannel::SendPacket, and that thing already has a very similar
> check:
> 
>   if (best_connection_ == NULL) {
>     error_ = EWOULDBLOCK;
>     return -1;
>   }
> 
> So why not combine the two "EWOULDBLOCK" checks into one place in
> P2PTransportChannel::SendPacket and have it be like this:
> 
> if (!SelectedConnectionWritableOrPresumedWritable()) {
>   error_ = EWOULDBLOCK;
>   return -1;
> }
> 
> bool P2PTransportChannel::SelectedConnectionWritableOrPresumedWritable() {
>   return selected_connection_ && (selected_connection_->writable() || 
>                                   PresumedWritable(selected_connection_)
> }
> 
> That last method could also replace line 1266, which has the same logic.

I agree with Peter's suggestion. Like I said earlier, I'd like to have
Connection be as simple a class as possible and let P2PTransportChannel be the
place where the ICE state machine logic is defined.

Powered by Google App Engine
This is Rietveld 408576698