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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 remote_supports_renomination_ = remote_supports_renomination; | 214 remote_supports_renomination_ = remote_supports_renomination; |
215 } | 215 } |
216 | 216 |
217 private: | 217 private: |
218 rtc::Thread* thread() const { return worker_thread_; } | 218 rtc::Thread* thread() const { return worker_thread_; } |
219 bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); } | 219 bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); } |
220 | 220 |
221 // A transport channel is weak if the current best connection is either | 221 // A transport channel is weak if the current best connection is either |
222 // not receiving or not writable, or if there is no best connection at all. | 222 // not receiving or not writable, or if there is no best connection at all. |
223 bool weak() const; | 223 bool weak() const; |
224 // Returns true if it's possible to send packets on this channel. | 224 // Returns true if it's possible to send packets on |connection|. |
225 bool ReadyToSend() const; | 225 bool ReadyToSend(Connection* connection) const; |
226 void UpdateConnectionStates(); | 226 void UpdateConnectionStates(); |
227 void RequestSortAndStateUpdate(); | 227 void RequestSortAndStateUpdate(); |
228 // Start pinging if we haven't already started, and we now have a connection | 228 // Start pinging if we haven't already started, and we now have a connection |
229 // that's pingable. | 229 // that's pingable. |
230 void MaybeStartPinging(); | 230 void MaybeStartPinging(); |
231 | 231 |
232 // The methods below return a positive value if |a| is preferable to |b|, | 232 // The methods below return a positive value if |a| is preferable to |b|, |
233 // a negative value if |b| is preferable, and 0 if they're equally preferable. | 233 // a negative value if |b| is preferable, and 0 if they're equally preferable. |
234 // If |receiving_unchanged_threshold| is set, then when |b| is receiving and | 234 // If |receiving_unchanged_threshold| is set, then when |b| is receiving and |
235 // |a| is not, returns a negative value only if |b| has been in receiving | 235 // |a| is not, returns a negative value only if |b| has been in receiving |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // The value put in the "nomination" attribute for the next nominated | 417 // The value put in the "nomination" attribute for the next nominated |
418 // connection. A zero-value indicates the connection will not be nominated. | 418 // connection. A zero-value indicates the connection will not be nominated. |
419 uint32_t nomination_ = 0; | 419 uint32_t nomination_ = 0; |
420 | 420 |
421 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 421 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
422 }; | 422 }; |
423 | 423 |
424 } // namespace cricket | 424 } // namespace cricket |
425 | 425 |
426 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 426 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |