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

Side by Side Diff: webrtc/p2p/base/tcpport.cc

Issue 2594623002: Add disabled certificate check support to IceServer PeerConnection API. (Closed)
Patch Set: Support deprecated OPT_SSLTCP name to prevent API breakage. 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/relayport.cc ('k') | webrtc/p2p/base/turnport.h » ('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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 484
485 void TCPConnection::OnReadyToSend(rtc::AsyncPacketSocket* socket) { 485 void TCPConnection::OnReadyToSend(rtc::AsyncPacketSocket* socket) {
486 ASSERT(socket == socket_.get()); 486 ASSERT(socket == socket_.get());
487 Connection::OnReadyToSend(); 487 Connection::OnReadyToSend();
488 } 488 }
489 489
490 void TCPConnection::CreateOutgoingTcpSocket() { 490 void TCPConnection::CreateOutgoingTcpSocket() {
491 ASSERT(outgoing_); 491 ASSERT(outgoing_);
492 // TODO(guoweis): Handle failures here (unlikely since TCP). 492 // TODO(guoweis): Handle failures here (unlikely since TCP).
493 int opts = (remote_candidate().protocol() == SSLTCP_PROTOCOL_NAME) 493 int opts = (remote_candidate().protocol() == SSLTCP_PROTOCOL_NAME)
494 ? rtc::PacketSocketFactory::OPT_SSLTCP 494 ? rtc::PacketSocketFactory::OPT_TLS_FAKE
495 : 0; 495 : 0;
496 socket_.reset(port()->socket_factory()->CreateClientTcpSocket( 496 socket_.reset(port()->socket_factory()->CreateClientTcpSocket(
497 rtc::SocketAddress(port()->ip(), 0), remote_candidate().address(), 497 rtc::SocketAddress(port()->ip(), 0), remote_candidate().address(),
498 port()->proxy(), port()->user_agent(), opts)); 498 port()->proxy(), port()->user_agent(), opts));
499 if (socket_) { 499 if (socket_) {
500 LOG_J(LS_VERBOSE, this) 500 LOG_J(LS_VERBOSE, this)
501 << "Connecting from " << socket_->GetLocalAddress().ToSensitiveString() 501 << "Connecting from " << socket_->GetLocalAddress().ToSensitiveString()
502 << " to " << remote_candidate().address().ToSensitiveString(); 502 << " to " << remote_candidate().address().ToSensitiveString();
503 set_connected(false); 503 set_connected(false);
504 connection_pending_ = true; 504 connection_pending_ = true;
505 ConnectSocketSignals(socket_.get()); 505 ConnectSocketSignals(socket_.get());
506 } else { 506 } else {
507 LOG_J(LS_WARNING, this) << "Failed to create connection to " 507 LOG_J(LS_WARNING, this) << "Failed to create connection to "
508 << remote_candidate().address().ToSensitiveString(); 508 << remote_candidate().address().ToSensitiveString();
509 } 509 }
510 } 510 }
511 511
512 void TCPConnection::ConnectSocketSignals(rtc::AsyncPacketSocket* socket) { 512 void TCPConnection::ConnectSocketSignals(rtc::AsyncPacketSocket* socket) {
513 if (outgoing_) { 513 if (outgoing_) {
514 socket->SignalConnect.connect(this, &TCPConnection::OnConnect); 514 socket->SignalConnect.connect(this, &TCPConnection::OnConnect);
515 } 515 }
516 socket->SignalReadPacket.connect(this, &TCPConnection::OnReadPacket); 516 socket->SignalReadPacket.connect(this, &TCPConnection::OnReadPacket);
517 socket->SignalReadyToSend.connect(this, &TCPConnection::OnReadyToSend); 517 socket->SignalReadyToSend.connect(this, &TCPConnection::OnReadyToSend);
518 socket->SignalClose.connect(this, &TCPConnection::OnClose); 518 socket->SignalClose.connect(this, &TCPConnection::OnClose);
519 } 519 }
520 520
521 } // namespace cricket 521 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/relayport.cc ('k') | webrtc/p2p/base/turnport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698