| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 // If the current best connection is both writable and receiving, then we will | 198 // If the current best connection is both writable and receiving, then we will |
| 199 // also try hard to make sure it is pinged at this rate (a little less than | 199 // also try hard to make sure it is pinged at this rate (a little less than |
| 200 // 2 * STRONG_PING_DELAY). | 200 // 2 * STRONG_PING_DELAY). |
| 201 static const uint32_t MAX_CURRENT_STRONG_DELAY = 900; | 201 static const uint32_t MAX_CURRENT_STRONG_DELAY = 900; |
| 202 | 202 |
| 203 static const int MIN_CHECK_RECEIVING_DELAY = 50; // ms | 203 static const int MIN_CHECK_RECEIVING_DELAY = 50; // ms |
| 204 | 204 |
| 205 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, | 205 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, |
| 206 int component, | 206 int component, |
| 207 P2PTransport* transport, |
| 207 PortAllocator* allocator) | 208 PortAllocator* allocator) |
| 208 : TransportChannelImpl(transport_name, component), | 209 : TransportChannelImpl(transport_name, component), |
| 210 transport_(transport), |
| 209 allocator_(allocator), | 211 allocator_(allocator), |
| 210 worker_thread_(rtc::Thread::Current()), | 212 worker_thread_(rtc::Thread::Current()), |
| 211 incoming_only_(false), | 213 incoming_only_(false), |
| 212 error_(0), | 214 error_(0), |
| 213 best_connection_(NULL), | 215 best_connection_(NULL), |
| 214 pending_best_connection_(NULL), | 216 pending_best_connection_(NULL), |
| 215 sort_dirty_(false), | 217 sort_dirty_(false), |
| 216 remote_ice_mode_(ICEMODE_FULL), | 218 remote_ice_mode_(ICEMODE_FULL), |
| 217 ice_role_(ICEROLE_UNKNOWN), | 219 ice_role_(ICEROLE_UNKNOWN), |
| 218 tiebreaker_(0), | 220 tiebreaker_(0), |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 SignalSentPacket(this, sent_packet); | 1430 SignalSentPacket(this, sent_packet); |
| 1429 } | 1431 } |
| 1430 | 1432 |
| 1431 void P2PTransportChannel::OnReadyToSend(Connection* connection) { | 1433 void P2PTransportChannel::OnReadyToSend(Connection* connection) { |
| 1432 if (connection == best_connection_ && writable()) { | 1434 if (connection == best_connection_ && writable()) { |
| 1433 SignalReadyToSend(this); | 1435 SignalReadyToSend(this); |
| 1434 } | 1436 } |
| 1435 } | 1437 } |
| 1436 | 1438 |
| 1437 } // namespace cricket | 1439 } // namespace cricket |
| OLD | NEW |