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

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

Issue 1231913003: Add methods to set the ICE connection receiving_timeout values. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address comments Created 5 years, 5 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
« no previous file with comments | « webrtc/p2p/base/session_unittest.cc ('k') | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 // Returns whether the client has requested the channels to connect. 194 // Returns whether the client has requested the channels to connect.
195 bool connect_requested() const { return connect_requested_; } 195 bool connect_requested() const { return connect_requested_; }
196 196
197 void SetIceRole(IceRole role); 197 void SetIceRole(IceRole role);
198 IceRole ice_role() const { return ice_role_; } 198 IceRole ice_role() const { return ice_role_; }
199 199
200 void SetIceTiebreaker(uint64 IceTiebreaker) { tiebreaker_ = IceTiebreaker; } 200 void SetIceTiebreaker(uint64 IceTiebreaker) { tiebreaker_ = IceTiebreaker; }
201 uint64 IceTiebreaker() { return tiebreaker_; } 201 uint64 IceTiebreaker() { return tiebreaker_; }
202 202
203 void SetChannelReceivingTimeout(int timeout_ms);
204
203 // Must be called before applying local session description. 205 // Must be called before applying local session description.
204 void SetIdentity(rtc::SSLIdentity* identity); 206 void SetIdentity(rtc::SSLIdentity* identity);
205 207
206 // Get a copy of the local identity provided by SetIdentity. 208 // Get a copy of the local identity provided by SetIdentity.
207 bool GetIdentity(rtc::SSLIdentity** identity); 209 bool GetIdentity(rtc::SSLIdentity** identity);
208 210
209 // Get a copy of the remote certificate in use by the specified channel. 211 // Get a copy of the remote certificate in use by the specified channel.
210 bool GetRemoteCertificate(rtc::SSLCertificate** cert); 212 bool GetRemoteCertificate(rtc::SSLCertificate** cert);
211 213
212 TransportProtocol protocol() const { return protocol_; } 214 TransportProtocol protocol() const { return protocol_; }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 void SetRemoteIceMode_w(IceMode mode); 433 void SetRemoteIceMode_w(IceMode mode);
432 bool SetLocalTransportDescription_w(const TransportDescription& desc, 434 bool SetLocalTransportDescription_w(const TransportDescription& desc,
433 ContentAction action, 435 ContentAction action,
434 std::string* error_desc); 436 std::string* error_desc);
435 bool SetRemoteTransportDescription_w(const TransportDescription& desc, 437 bool SetRemoteTransportDescription_w(const TransportDescription& desc,
436 ContentAction action, 438 ContentAction action,
437 std::string* error_desc); 439 std::string* error_desc);
438 bool GetStats_w(TransportStats* infos); 440 bool GetStats_w(TransportStats* infos);
439 bool GetRemoteCertificate_w(rtc::SSLCertificate** cert); 441 bool GetRemoteCertificate_w(rtc::SSLCertificate** cert);
440 442
443 void SetChannelReceivingTimeout_w(int timeout_ms);
444
441 // Sends SignalCompleted if we are now in that state. 445 // Sends SignalCompleted if we are now in that state.
442 void MaybeCompleted_w(); 446 void MaybeCompleted_w();
443 447
444 rtc::Thread* const signaling_thread_; 448 rtc::Thread* const signaling_thread_;
445 rtc::Thread* const worker_thread_; 449 rtc::Thread* const worker_thread_;
446 const std::string content_name_; 450 const std::string content_name_;
447 const std::string type_; 451 const std::string type_;
448 PortAllocator* const allocator_; 452 PortAllocator* const allocator_;
449 bool destroyed_; 453 bool destroyed_;
450 TransportState readable_; 454 TransportState readable_;
451 TransportState writable_; 455 TransportState writable_;
452 TransportState receiving_; 456 TransportState receiving_;
453 bool was_writable_; 457 bool was_writable_;
454 bool connect_requested_; 458 bool connect_requested_;
455 IceRole ice_role_; 459 IceRole ice_role_;
456 uint64 tiebreaker_; 460 uint64 tiebreaker_;
457 TransportProtocol protocol_; 461 TransportProtocol protocol_;
458 IceMode remote_ice_mode_; 462 IceMode remote_ice_mode_;
463 int channel_receiving_timeout_;
459 rtc::scoped_ptr<TransportDescription> local_description_; 464 rtc::scoped_ptr<TransportDescription> local_description_;
460 rtc::scoped_ptr<TransportDescription> remote_description_; 465 rtc::scoped_ptr<TransportDescription> remote_description_;
461 466
462 // TODO(tommi): Make sure we only use this on the worker thread. 467 // TODO(tommi): Make sure we only use this on the worker thread.
463 ChannelMap channels_; 468 ChannelMap channels_;
464 // Buffers the ready_candidates so that SignalCanidatesReady can 469 // Buffers the ready_candidates so that SignalCanidatesReady can
465 // provide them in multiples. 470 // provide them in multiples.
466 std::vector<Candidate> ready_candidates_; 471 std::vector<Candidate> ready_candidates_;
467 // Protects changes to channels and messages 472 // Protects changes to channels and messages
468 rtc::CriticalSection crit_; 473 rtc::CriticalSection crit_;
469 474
470 DISALLOW_COPY_AND_ASSIGN(Transport); 475 DISALLOW_COPY_AND_ASSIGN(Transport);
471 }; 476 };
472 477
473 // Extract a TransportProtocol from a TransportDescription. 478 // Extract a TransportProtocol from a TransportDescription.
474 TransportProtocol TransportProtocolFromDescription( 479 TransportProtocol TransportProtocolFromDescription(
475 const TransportDescription* desc); 480 const TransportDescription* desc);
476 481
477 } // namespace cricket 482 } // namespace cricket
478 483
479 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ 484 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/session_unittest.cc ('k') | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698