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

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 1359363003: Make it possible to keep the port allocator session running (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/portallocator.h » ('j') | webrtc/p2p/base/portallocator.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 set_receiving(receiving); 1063 set_receiving(receiving);
1064 } 1064 }
1065 1065
1066 // We checked the status of our connections and we had at least one that 1066 // We checked the status of our connections and we had at least one that
1067 // was writable, go into the writable state. 1067 // was writable, go into the writable state.
1068 void P2PTransportChannel::HandleWritable() { 1068 void P2PTransportChannel::HandleWritable() {
1069 ASSERT(worker_thread_ == rtc::Thread::Current()); 1069 ASSERT(worker_thread_ == rtc::Thread::Current());
1070 if (!writable()) { 1070 if (!writable()) {
1071 for (uint32 i = 0; i < allocator_sessions_.size(); ++i) { 1071 for (uint32 i = 0; i < allocator_sessions_.size(); ++i) {
1072 if (allocator_sessions_[i]->IsGettingPorts()) { 1072 if (allocator_sessions_[i]->IsGettingPorts()) {
1073 allocator_sessions_[i]->StopGettingPorts(); 1073 allocator_sessions_[i]->StopGettingPorts(false);
1074 } 1074 }
1075 } 1075 }
1076 } 1076 }
1077 1077
1078 was_writable_ = true; 1078 was_writable_ = true;
1079 set_writable(true); 1079 set_writable(true);
1080 } 1080 }
1081 1081
1082 // Notify upper layer about channel not writable state, if it was before. 1082 // Notify upper layer about channel not writable state, if it was before.
1083 void P2PTransportChannel::HandleNotWritable() { 1083 void P2PTransportChannel::HandleNotWritable() {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 } 1342 }
1343 } 1343 }
1344 1344
1345 void P2PTransportChannel::OnReadyToSend(Connection* connection) { 1345 void P2PTransportChannel::OnReadyToSend(Connection* connection) {
1346 if (connection == best_connection_ && writable()) { 1346 if (connection == best_connection_ && writable()) {
1347 SignalReadyToSend(this); 1347 SignalReadyToSend(this);
1348 } 1348 }
1349 } 1349 }
1350 1350
1351 } // namespace cricket 1351 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/portallocator.h » ('j') | webrtc/p2p/base/portallocator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698