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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 PortInterface* origin_port); | 213 PortInterface* origin_port); |
214 bool CreateConnection(PortInterface* port, | 214 bool CreateConnection(PortInterface* port, |
215 const Candidate& remote_candidate, | 215 const Candidate& remote_candidate, |
216 PortInterface* origin_port); | 216 PortInterface* origin_port); |
217 bool FindConnection(cricket::Connection* connection) const; | 217 bool FindConnection(cricket::Connection* connection) const; |
218 | 218 |
219 uint32_t GetRemoteCandidateGeneration(const Candidate& candidate); | 219 uint32_t GetRemoteCandidateGeneration(const Candidate& candidate); |
220 bool IsDuplicateRemoteCandidate(const Candidate& candidate); | 220 bool IsDuplicateRemoteCandidate(const Candidate& candidate); |
221 void RememberRemoteCandidate(const Candidate& remote_candidate, | 221 void RememberRemoteCandidate(const Candidate& remote_candidate, |
222 PortInterface* origin_port); | 222 PortInterface* origin_port); |
223 bool IsPingable(Connection* conn, uint32_t now); | 223 bool IsPingable(Connection* conn, int64_t now); |
224 void PingConnection(Connection* conn); | 224 void PingConnection(Connection* conn); |
225 void AddAllocatorSession(PortAllocatorSession* session); | 225 void AddAllocatorSession(PortAllocatorSession* session); |
226 void AddConnection(Connection* connection); | 226 void AddConnection(Connection* connection); |
227 | 227 |
228 void OnPortReady(PortAllocatorSession *session, PortInterface* port); | 228 void OnPortReady(PortAllocatorSession *session, PortInterface* port); |
229 void OnCandidatesReady(PortAllocatorSession *session, | 229 void OnCandidatesReady(PortAllocatorSession *session, |
230 const std::vector<Candidate>& candidates); | 230 const std::vector<Candidate>& candidates); |
231 void OnCandidatesAllocationDone(PortAllocatorSession* session); | 231 void OnCandidatesAllocationDone(PortAllocatorSession* session); |
232 void OnUnknownAddress(PortInterface* port, | 232 void OnUnknownAddress(PortInterface* port, |
233 const rtc::SocketAddress& addr, | 233 const rtc::SocketAddress& addr, |
(...skipping 15 matching lines...) Expand all Loading... |
249 void OnNominated(Connection* conn); | 249 void OnNominated(Connection* conn); |
250 | 250 |
251 void OnMessage(rtc::Message* pmsg) override; | 251 void OnMessage(rtc::Message* pmsg) override; |
252 void OnSort(); | 252 void OnSort(); |
253 void OnCheckAndPing(); | 253 void OnCheckAndPing(); |
254 | 254 |
255 void PruneConnections(); | 255 void PruneConnections(); |
256 Connection* best_nominated_connection() const; | 256 Connection* best_nominated_connection() const; |
257 bool IsBackupConnection(Connection* conn) const; | 257 bool IsBackupConnection(Connection* conn) const; |
258 | 258 |
259 Connection* FindConnectionToPing(uint32_t now); | 259 Connection* FindConnectionToPing(int64_t now); |
260 Connection* FindOldestConnectionNeedingTriggeredCheck(uint32_t now); | 260 Connection* FindOldestConnectionNeedingTriggeredCheck(int64_t now); |
261 // Between |conn1| and |conn2|, this function returns the one which should | 261 // Between |conn1| and |conn2|, this function returns the one which should |
262 // be pinged first. | 262 // be pinged first. |
263 Connection* SelectMostPingableConnection(Connection* conn1, | 263 Connection* SelectMostPingableConnection(Connection* conn1, |
264 Connection* conn2); | 264 Connection* conn2); |
265 // Select the connection which is Relay/Relay. If both of them are, | 265 // Select the connection which is Relay/Relay. If both of them are, |
266 // UDP relay protocol takes precedence. | 266 // UDP relay protocol takes precedence. |
267 Connection* MostLikelyToWork(Connection* conn1, Connection* conn2); | 267 Connection* MostLikelyToWork(Connection* conn1, Connection* conn2); |
268 // Compare the last_ping_sent time and return the one least recently pinged. | 268 // Compare the last_ping_sent time and return the one least recently pinged. |
269 Connection* LeastRecentlyPinged(Connection* conn1, Connection* conn2); | 269 Connection* LeastRecentlyPinged(Connection* conn1, Connection* conn2); |
270 | 270 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 OptionMap options_; | 314 OptionMap options_; |
315 std::string ice_ufrag_; | 315 std::string ice_ufrag_; |
316 std::string ice_pwd_; | 316 std::string ice_pwd_; |
317 std::vector<IceParameters> remote_ice_parameters_; | 317 std::vector<IceParameters> remote_ice_parameters_; |
318 IceMode remote_ice_mode_; | 318 IceMode remote_ice_mode_; |
319 IceRole ice_role_; | 319 IceRole ice_role_; |
320 uint64_t tiebreaker_; | 320 uint64_t tiebreaker_; |
321 IceGatheringState gathering_state_; | 321 IceGatheringState gathering_state_; |
322 | 322 |
323 int check_receiving_interval_; | 323 int check_receiving_interval_; |
324 uint32_t last_ping_sent_ms_ = 0; | 324 int64_t last_ping_sent_ms_ = 0; |
325 int weak_ping_interval_ = WEAK_PING_INTERVAL; | 325 int weak_ping_interval_ = WEAK_PING_INTERVAL; |
326 TransportChannelState state_ = TransportChannelState::STATE_INIT; | 326 TransportChannelState state_ = TransportChannelState::STATE_INIT; |
327 IceConfig config_; | 327 IceConfig config_; |
328 | 328 |
329 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 329 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
330 }; | 330 }; |
331 | 331 |
332 } // namespace cricket | 332 } // namespace cricket |
333 | 333 |
334 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 334 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |