OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |