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

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

Issue 2099783002: Fixing bug where Connection drops packets when presumed writable. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master. Created 4 years, 5 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/p2p/base/faketransportcontroller.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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return remote_candidates_; 205 return remote_candidates_;
206 } 206 }
207 207
208 private: 208 private:
209 rtc::Thread* thread() { return worker_thread_; } 209 rtc::Thread* thread() { return worker_thread_; }
210 bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); } 210 bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); }
211 211
212 // A transport channel is weak if the current best connection is either 212 // A transport channel is weak if the current best connection is either
213 // not receiving or not writable, or if there is no best connection at all. 213 // not receiving or not writable, or if there is no best connection at all.
214 bool weak() const; 214 bool weak() const;
215 // Returns true if it's possible to send packets on this channel.
216 bool ReadyToSend() const;
215 void UpdateConnectionStates(); 217 void UpdateConnectionStates();
216 void RequestSort(); 218 void RequestSort();
217 219
218 // The methods below return a positive value if a is preferable to b, 220 // The methods below return a positive value if a is preferable to b,
219 // a negative value if b is preferable, and 0 if they're equally preferable. 221 // a negative value if b is preferable, and 0 if they're equally preferable.
220 int CompareConnectionStates(const cricket::Connection* a, 222 int CompareConnectionStates(const cricket::Connection* a,
221 const cricket::Connection* b) const; 223 const cricket::Connection* b) const;
222 int CompareConnectionCandidates(const cricket::Connection* a, 224 int CompareConnectionCandidates(const cricket::Connection* a,
223 const cricket::Connection* b) const; 225 const cricket::Connection* b) const;
224 // Compares two connections based on the connection states 226 // Compares two connections based on the connection states
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 TransportChannelState state_ = TransportChannelState::STATE_INIT; 366 TransportChannelState state_ = TransportChannelState::STATE_INIT;
365 IceConfig config_; 367 IceConfig config_;
366 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. 368 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before.
367 369
368 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); 370 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
369 }; 371 };
370 372
371 } // namespace cricket 373 } // namespace cricket
372 374
373 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ 375 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/faketransportcontroller.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698