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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |