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

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

Issue 1371623003: Delete a connection only if it has timed out on writing and not receiving for 10 seconds. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Rename a test Created 5 years, 2 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 | « no previous file | 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Connection* FindNextPingableConnection(); 157 Connection* FindNextPingableConnection();
158 158
159 private: 159 private:
160 rtc::Thread* thread() { return worker_thread_; } 160 rtc::Thread* thread() { return worker_thread_; }
161 PortAllocatorSession* allocator_session() { 161 PortAllocatorSession* allocator_session() {
162 return allocator_sessions_.back(); 162 return allocator_sessions_.back();
163 } 163 }
164 164
165 // A transport channel is weak if the current best connection is either 165 // A transport channel is weak if the current best connection is either
166 // not receiving or not writable, or if there is no best connection at all. 166 // not receiving or not writable, or if there is no best connection at all.
167 bool Weak() const; 167 bool weak() const;
168 void UpdateConnectionStates(); 168 void UpdateConnectionStates();
169 void RequestSort(); 169 void RequestSort();
170 void SortConnections(); 170 void SortConnections();
171 void SwitchBestConnectionTo(Connection* conn); 171 void SwitchBestConnectionTo(Connection* conn);
172 void UpdateChannelState(); 172 void UpdateChannelState();
173 void HandleWritable(); 173 void HandleWritable();
174 void HandleNotWritable(); 174 void HandleNotWritable();
175 void HandleAllTimedOut(); 175 void HandleAllTimedOut();
176 176
177 Connection* GetBestConnectionOnNetwork(rtc::Network* network) const; 177 Connection* GetBestConnectionOnNetwork(rtc::Network* network) const;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 int receiving_timeout_; 251 int receiving_timeout_;
252 uint32 last_ping_sent_ms_ = 0; 252 uint32 last_ping_sent_ms_ = 0;
253 bool gather_continually_ = false; 253 bool gather_continually_ = false;
254 254
255 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); 255 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
256 }; 256 };
257 257
258 } // namespace cricket 258 } // namespace cricket
259 259
260 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ 260 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698