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

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

Issue 2212683002: Do not switch a connection if the new connection is not ready to send packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge Created 4 years, 4 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 | « webrtc/base/gunit.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « webrtc/base/gunit.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698