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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 | 301 |
302 // |connections_| is a sorted list with the first one always be the | 302 // |connections_| is a sorted list with the first one always be the |
303 // |best_connection_| when it's not nullptr. The combination of | 303 // |best_connection_| when it's not nullptr. The combination of |
304 // |pinged_connections_| and |unpinged_connections_| has the same | 304 // |pinged_connections_| and |unpinged_connections_| has the same |
305 // connections as |connections_|. These 2 sets maintain whether a | 305 // connections as |connections_|. These 2 sets maintain whether a |
306 // connection should be pinged next or not. | 306 // connection should be pinged next or not. |
307 std::vector<Connection *> connections_; | 307 std::vector<Connection *> connections_; |
308 std::set<Connection*> pinged_connections_; | 308 std::set<Connection*> pinged_connections_; |
309 std::set<Connection*> unpinged_connections_; | 309 std::set<Connection*> unpinged_connections_; |
310 | 310 |
311 Connection* best_connection_; | 311 Connection* best_connection_ = nullptr; |
pthatcher1
2016/06/15 21:59:52
Can we just start calling the "selected_connection
honghaiz3
2016/06/16 23:03:48
Done.
| |
312 | 312 |
313 // Connection selected by the controlling agent. This should be used only | 313 // Connection selected by the controlling agent. This should be used only |
pthatcher1
2016/06/15 21:59:52
It should be "connection nominated by the controll
honghaiz3
2016/06/16 23:03:48
Done.
| |
314 // at controlled side when protocol type is RFC5245. | 314 // at controlled side when protocol type is RFC5245. |
pthatcher1
2016/06/15 21:59:52
The stuff about protocol type is no longer needed.
honghaiz3
2016/06/16 23:03:48
Done.
| |
315 Connection* pending_best_connection_; | 315 Connection* last_nominated_conn_ = nullptr; |
pthatcher1
2016/06/15 21:59:52
We could have it be "conn_" everwhere (including s
honghaiz3
2016/06/16 23:03:48
Done.
| |
316 // The connection on which the data was received most recently. | |
pthatcher1
2016/06/15 21:59:52
was most recently received.
honghaiz3
2016/06/16 23:03:48
Done.
| |
317 Connection* last_data_received_conn_ = nullptr; | |
pthatcher1
2016/06/15 21:59:52
I think this should coincide with our "receiving"
honghaiz3
2016/06/16 23:03:48
Using last_receiving_connection_ as it is shorter
| |
318 | |
316 std::vector<RemoteCandidate> remote_candidates_; | 319 std::vector<RemoteCandidate> remote_candidates_; |
317 bool sort_dirty_; // indicates whether another sort is needed right now | 320 bool sort_dirty_; // indicates whether another sort is needed right now |
318 bool had_connection_ = false; // if connections_ has ever been nonempty | 321 bool had_connection_ = false; // if connections_ has ever been nonempty |
319 typedef std::map<rtc::Socket::Option, int> OptionMap; | 322 typedef std::map<rtc::Socket::Option, int> OptionMap; |
320 OptionMap options_; | 323 OptionMap options_; |
321 std::string ice_ufrag_; | 324 std::string ice_ufrag_; |
322 std::string ice_pwd_; | 325 std::string ice_pwd_; |
323 std::vector<IceParameters> remote_ice_parameters_; | 326 std::vector<IceParameters> remote_ice_parameters_; |
324 IceMode remote_ice_mode_; | 327 IceMode remote_ice_mode_; |
325 IceRole ice_role_; | 328 IceRole ice_role_; |
326 uint64_t tiebreaker_; | 329 uint64_t tiebreaker_; |
327 IceGatheringState gathering_state_; | 330 IceGatheringState gathering_state_; |
328 | 331 |
329 int check_receiving_interval_; | 332 int check_receiving_interval_; |
330 int64_t last_ping_sent_ms_ = 0; | 333 int64_t last_ping_sent_ms_ = 0; |
331 int weak_ping_interval_ = WEAK_PING_INTERVAL; | 334 int weak_ping_interval_ = WEAK_PING_INTERVAL; |
332 TransportChannelState state_ = TransportChannelState::STATE_INIT; | 335 TransportChannelState state_ = TransportChannelState::STATE_INIT; |
333 IceConfig config_; | 336 IceConfig config_; |
334 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. | 337 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. |
335 | 338 |
336 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 339 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
337 }; | 340 }; |
338 | 341 |
339 } // namespace cricket | 342 } // namespace cricket |
340 | 343 |
341 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 344 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |