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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 return remote_ice_parameters_.empty() | 290 return remote_ice_parameters_.empty() |
291 ? 0 | 291 ? 0 |
292 : static_cast<uint32_t>(remote_ice_parameters_.size() - 1); | 292 : static_cast<uint32_t>(remote_ice_parameters_.size() - 1); |
293 } | 293 } |
294 | 294 |
295 PortAllocator* allocator_; | 295 PortAllocator* allocator_; |
296 rtc::Thread* worker_thread_; | 296 rtc::Thread* worker_thread_; |
297 bool incoming_only_; | 297 bool incoming_only_; |
298 int error_; | 298 int error_; |
299 std::vector<std::unique_ptr<PortAllocatorSession>> allocator_sessions_; | 299 std::vector<std::unique_ptr<PortAllocatorSession>> allocator_sessions_; |
300 std::vector<PortInterface *> ports_; | 300 // |ports_| contains ports that are used to form new connections when |
| 301 // new remote candidates are added. |
| 302 std::vector<PortInterface*> ports_; |
| 303 // |removed_ports_| contains ports that have been removed from |ports_| and |
| 304 // are not being used to form new connections, but that aren't yet destroyed. |
| 305 // They may have existing connections, and they still fire signals such as |
| 306 // SignalUnknownAddress. |
| 307 std::vector<PortInterface*> removed_ports_; |
301 | 308 |
302 // |connections_| is a sorted list with the first one always be the | 309 // |connections_| is a sorted list with the first one always be the |
303 // |best_connection_| when it's not nullptr. The combination of | 310 // |best_connection_| when it's not nullptr. The combination of |
304 // |pinged_connections_| and |unpinged_connections_| has the same | 311 // |pinged_connections_| and |unpinged_connections_| has the same |
305 // connections as |connections_|. These 2 sets maintain whether a | 312 // connections as |connections_|. These 2 sets maintain whether a |
306 // connection should be pinged next or not. | 313 // connection should be pinged next or not. |
307 std::vector<Connection *> connections_; | 314 std::vector<Connection *> connections_; |
308 std::set<Connection*> pinged_connections_; | 315 std::set<Connection*> pinged_connections_; |
309 std::set<Connection*> unpinged_connections_; | 316 std::set<Connection*> unpinged_connections_; |
310 | 317 |
(...skipping 21 matching lines...) Expand all Loading... |
332 TransportChannelState state_ = TransportChannelState::STATE_INIT; | 339 TransportChannelState state_ = TransportChannelState::STATE_INIT; |
333 IceConfig config_; | 340 IceConfig config_; |
334 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. | 341 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. |
335 | 342 |
336 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 343 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
337 }; | 344 }; |
338 | 345 |
339 } // namespace cricket | 346 } // namespace cricket |
340 | 347 |
341 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 348 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |