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

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

Issue 2590153002: Revert of Add disabled certificate check support to IceServer PeerConnection API. (Closed)
Patch Set: Created 4 years 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/tcpport.cc ('k') | webrtc/p2p/base/turnport.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 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 rtc::SocketAddress GetLocalAddress() const; 80 rtc::SocketAddress GetLocalAddress() const;
81 81
82 bool ready() const { return state_ == STATE_READY; } 82 bool ready() const { return state_ == STATE_READY; }
83 bool connected() const { 83 bool connected() const {
84 return state_ == STATE_READY || state_ == STATE_CONNECTED; 84 return state_ == STATE_READY || state_ == STATE_CONNECTED;
85 } 85 }
86 const RelayCredentials& credentials() const { return credentials_; } 86 const RelayCredentials& credentials() const { return credentials_; }
87 87
88 virtual ProtocolType GetProtocol() const { return server_address_.proto; } 88 virtual ProtocolType GetProtocol() const { return server_address_.proto; }
89 89
90 virtual TlsCertPolicy GetTlsCertPolicy() const { return tls_cert_policy_; }
91
92 virtual void SetTlsCertPolicy(TlsCertPolicy tls_cert_policy) {
93 tls_cert_policy_ = tls_cert_policy;
94 }
95
96 virtual void PrepareAddress(); 90 virtual void PrepareAddress();
97 virtual Connection* CreateConnection( 91 virtual Connection* CreateConnection(
98 const Candidate& c, PortInterface::CandidateOrigin origin); 92 const Candidate& c, PortInterface::CandidateOrigin origin);
99 virtual int SendTo(const void* data, size_t size, 93 virtual int SendTo(const void* data, size_t size,
100 const rtc::SocketAddress& addr, 94 const rtc::SocketAddress& addr,
101 const rtc::PacketOptions& options, 95 const rtc::PacketOptions& options,
102 bool payload); 96 bool payload);
103 virtual int SetOption(rtc::Socket::Option opt, int value); 97 virtual int SetOption(rtc::Socket::Option opt, int value);
104 virtual int GetOption(rtc::Socket::Option opt, int* value); 98 virtual int GetOption(rtc::Socket::Option opt, int* value);
105 virtual int GetError(); 99 virtual int GetError();
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // in |entry|. 248 // in |entry|.
255 void DestroyEntryIfNotCancelled(TurnEntry* entry, int64_t timestamp); 249 void DestroyEntryIfNotCancelled(TurnEntry* entry, int64_t timestamp);
256 void ScheduleEntryDestruction(TurnEntry* entry); 250 void ScheduleEntryDestruction(TurnEntry* entry);
257 void CancelEntryDestruction(TurnEntry* entry); 251 void CancelEntryDestruction(TurnEntry* entry);
258 252
259 // Marks the connection with remote address |address| failed and 253 // Marks the connection with remote address |address| failed and
260 // pruned (a.k.a. write-timed-out). Returns true if a connection is found. 254 // pruned (a.k.a. write-timed-out). Returns true if a connection is found.
261 bool FailAndPruneConnection(const rtc::SocketAddress& address); 255 bool FailAndPruneConnection(const rtc::SocketAddress& address);
262 256
263 ProtocolAddress server_address_; 257 ProtocolAddress server_address_;
264 TlsCertPolicy tls_cert_policy_ = TlsCertPolicy::TLS_CERT_POLICY_SECURE;
265 RelayCredentials credentials_; 258 RelayCredentials credentials_;
266 AttemptedServerSet attempted_server_addresses_; 259 AttemptedServerSet attempted_server_addresses_;
267 260
268 rtc::AsyncPacketSocket* socket_; 261 rtc::AsyncPacketSocket* socket_;
269 SocketOptionsMap socket_options_; 262 SocketOptionsMap socket_options_;
270 rtc::AsyncResolverInterface* resolver_; 263 rtc::AsyncResolverInterface* resolver_;
271 int error_; 264 int error_;
272 265
273 StunRequestManager request_manager_; 266 StunRequestManager request_manager_;
274 std::string realm_; // From 401/438 response message. 267 std::string realm_; // From 401/438 response message.
(...skipping 16 matching lines...) Expand all
291 friend class TurnEntry; 284 friend class TurnEntry;
292 friend class TurnAllocateRequest; 285 friend class TurnAllocateRequest;
293 friend class TurnRefreshRequest; 286 friend class TurnRefreshRequest;
294 friend class TurnCreatePermissionRequest; 287 friend class TurnCreatePermissionRequest;
295 friend class TurnChannelBindRequest; 288 friend class TurnChannelBindRequest;
296 }; 289 };
297 290
298 } // namespace cricket 291 } // namespace cricket
299 292
300 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ 293 #endif // WEBRTC_P2P_BASE_TURNPORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/tcpport.cc ('k') | webrtc/p2p/base/turnport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698