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 // |ports_| contains ports that are used to form new connections when | 300 std::vector<PortInterface *> ports_; |
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_; | |
308 | 301 |
309 // |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 |
310 // |best_connection_| when it's not nullptr. The combination of | 303 // |best_connection_| when it's not nullptr. The combination of |
311 // |pinged_connections_| and |unpinged_connections_| has the same | 304 // |pinged_connections_| and |unpinged_connections_| has the same |
312 // connections as |connections_|. These 2 sets maintain whether a | 305 // connections as |connections_|. These 2 sets maintain whether a |
313 // connection should be pinged next or not. | 306 // connection should be pinged next or not. |
314 std::vector<Connection *> connections_; | 307 std::vector<Connection *> connections_; |
315 std::set<Connection*> pinged_connections_; | 308 std::set<Connection*> pinged_connections_; |
316 std::set<Connection*> unpinged_connections_; | 309 std::set<Connection*> unpinged_connections_; |
317 | 310 |
(...skipping 21 matching lines...) Expand all Loading... |
339 TransportChannelState state_ = TransportChannelState::STATE_INIT; | 332 TransportChannelState state_ = TransportChannelState::STATE_INIT; |
340 IceConfig config_; | 333 IceConfig config_; |
341 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. | 334 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. |
342 | 335 |
343 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 336 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
344 }; | 337 }; |
345 | 338 |
346 } // namespace cricket | 339 } // namespace cricket |
347 | 340 |
348 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 341 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |