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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // also try hard to make sure it is pinged at this rate (a little less than | 212 // also try hard to make sure it is pinged at this rate (a little less than |
213 // 2 * STRONG_PING_DELAY). | 213 // 2 * STRONG_PING_DELAY). |
214 static const uint32_t MAX_CURRENT_STRONG_DELAY = 900; | 214 static const uint32_t MAX_CURRENT_STRONG_DELAY = 900; |
215 | 215 |
216 static const int MIN_CHECK_RECEIVING_DELAY = 50; // ms | 216 static const int MIN_CHECK_RECEIVING_DELAY = 50; // ms |
217 | 217 |
218 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, | 218 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, |
219 int component, | 219 int component, |
220 P2PTransport* transport, | 220 P2PTransport* transport, |
221 PortAllocator* allocator) | 221 PortAllocator* allocator) |
| 222 : P2PTransportChannel(transport_name, component, allocator) {} |
| 223 |
| 224 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, |
| 225 int component, |
| 226 PortAllocator* allocator) |
222 : TransportChannelImpl(transport_name, component), | 227 : TransportChannelImpl(transport_name, component), |
223 transport_(transport), | |
224 allocator_(allocator), | 228 allocator_(allocator), |
225 worker_thread_(rtc::Thread::Current()), | 229 worker_thread_(rtc::Thread::Current()), |
226 incoming_only_(false), | 230 incoming_only_(false), |
227 error_(0), | 231 error_(0), |
228 best_connection_(NULL), | 232 best_connection_(NULL), |
229 pending_best_connection_(NULL), | 233 pending_best_connection_(NULL), |
230 sort_dirty_(false), | 234 sort_dirty_(false), |
231 remote_ice_mode_(ICEMODE_FULL), | 235 remote_ice_mode_(ICEMODE_FULL), |
232 ice_role_(ICEROLE_UNKNOWN), | 236 ice_role_(ICEROLE_UNKNOWN), |
233 tiebreaker_(0), | 237 tiebreaker_(0), |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 SignalSentPacket(this, sent_packet); | 1468 SignalSentPacket(this, sent_packet); |
1465 } | 1469 } |
1466 | 1470 |
1467 void P2PTransportChannel::OnReadyToSend(Connection* connection) { | 1471 void P2PTransportChannel::OnReadyToSend(Connection* connection) { |
1468 if (connection == best_connection_ && writable()) { | 1472 if (connection == best_connection_ && writable()) { |
1469 SignalReadyToSend(this); | 1473 SignalReadyToSend(this); |
1470 } | 1474 } |
1471 } | 1475 } |
1472 | 1476 |
1473 } // namespace cricket | 1477 } // namespace cricket |
OLD | NEW |