Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel.h

Issue 2163403002: Prepare for ICE-renomination (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Public for unit tests. 200 // Public for unit tests.
201 PortAllocatorSession* allocator_session() { 201 PortAllocatorSession* allocator_session() {
202 return allocator_sessions_.back().get(); 202 return allocator_sessions_.back().get();
203 } 203 }
204 204
205 // Public for unit tests. 205 // Public for unit tests.
206 const std::vector<RemoteCandidate>& remote_candidates() const { 206 const std::vector<RemoteCandidate>& remote_candidates() const {
207 return remote_candidates_; 207 return remote_candidates_;
208 } 208 }
209 209
210 // Public for unit tests.
211 void set_peer_supports_renomination(bool peer_supports_renomination) {
212 peer_supports_renomination_ = peer_supports_renomination;
213 }
pthatcher1 2016/07/28 22:57:25 I think we should make a new method, SetRemoteIceP
honghaiz3 2016/08/03 04:46:56 The struct IceParameters is already there. In fact
pthatcher1 2016/08/03 22:13:25 Oh good, let's add "bool renomination" to it and u
honghaiz3 2016/08/03 23:39:51 Thanks. Will do it in the next CL.
214
210 private: 215 private:
211 rtc::Thread* thread() const { return worker_thread_; } 216 rtc::Thread* thread() const { return worker_thread_; }
212 bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); } 217 bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); }
213 218
214 // A transport channel is weak if the current best connection is either 219 // A transport channel is weak if the current best connection is either
215 // not receiving or not writable, or if there is no best connection at all. 220 // not receiving or not writable, or if there is no best connection at all.
216 bool weak() const; 221 bool weak() const;
217 // Returns true if it's possible to send packets on this channel. 222 // Returns true if it's possible to send packets on this channel.
218 bool ReadyToSend() const; 223 bool ReadyToSend() const;
219 void UpdateConnectionStates(); 224 void UpdateConnectionStates();
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 uint64_t tiebreaker_; 401 uint64_t tiebreaker_;
397 IceGatheringState gathering_state_; 402 IceGatheringState gathering_state_;
398 403
399 int check_receiving_interval_; 404 int check_receiving_interval_;
400 int64_t last_ping_sent_ms_ = 0; 405 int64_t last_ping_sent_ms_ = 0;
401 int weak_ping_interval_ = WEAK_PING_INTERVAL; 406 int weak_ping_interval_ = WEAK_PING_INTERVAL;
402 TransportChannelState state_ = TransportChannelState::STATE_INIT; 407 TransportChannelState state_ = TransportChannelState::STATE_INIT;
403 IceConfig config_; 408 IceConfig config_;
404 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. 409 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before.
405 bool started_pinging_ = false; 410 bool started_pinging_ = false;
411 // Its value will be set in subsequent CLs based on signaling exchange.
412 bool peer_supports_renomination_ = false;
413 // The value put in the "nomination" attribute for the next nominated
414 // connection. A zero-value indicates the connection will not be nominated.
415 int nominating_value_ = 0;
pthatcher1 2016/07/28 22:57:25 I'd prefer "nomination" over "nominating_value".
honghaiz3 2016/08/03 04:46:56 I choose nomination_ because it is more consistent
406 416
407 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); 417 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
408 }; 418 };
409 419
410 } // namespace cricket 420 } // namespace cricket
411 421
412 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ 422 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | webrtc/p2p/base/p2ptransportchannel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698