| OLD | NEW |
| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 SendRequest(new TurnAllocateRequest(this), 0); | 313 SendRequest(new TurnAllocateRequest(this), 0); |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 } | 316 } |
| 317 | 317 |
| 318 bool TurnPort::CreateTurnClientSocket() { | 318 bool TurnPort::CreateTurnClientSocket() { |
| 319 ASSERT(!socket_ || SharedSocket()); | 319 ASSERT(!socket_ || SharedSocket()); |
| 320 | 320 |
| 321 if (server_address_.proto == PROTO_UDP && !SharedSocket()) { | 321 if (server_address_.proto == PROTO_UDP && !SharedSocket()) { |
| 322 socket_ = socket_factory()->CreateUdpSocket( | 322 socket_ = socket_factory()->CreateUdpSocket( |
| 323 rtc::SocketAddress(ip(), 0), min_port(), max_port()); | 323 rtc::SocketAddress(ip(), 0), min_port(), max_port(), Network()); |
| 324 } else if (server_address_.proto == PROTO_TCP) { | 324 } else if (server_address_.proto == PROTO_TCP) { |
| 325 ASSERT(!SharedSocket()); | 325 ASSERT(!SharedSocket()); |
| 326 int opts = rtc::PacketSocketFactory::OPT_STUN; | 326 int opts = rtc::PacketSocketFactory::OPT_STUN; |
| 327 // If secure bit is enabled in server address, use TLS over TCP. | 327 // If secure bit is enabled in server address, use TLS over TCP. |
| 328 if (server_address_.secure) { | 328 if (server_address_.secure) { |
| 329 opts |= rtc::PacketSocketFactory::OPT_TLS; | 329 opts |= rtc::PacketSocketFactory::OPT_TLS; |
| 330 } | 330 } |
| 331 socket_ = socket_factory()->CreateClientTcpSocket( | 331 socket_ = socket_factory()->CreateClientTcpSocket( |
| 332 rtc::SocketAddress(ip(), 0), server_address_.address, | 332 rtc::SocketAddress(ip(), 0), server_address_.address, |
| 333 proxy(), user_agent(), opts); | 333 proxy(), user_agent(), opts); |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 } else { | 1483 } else { |
| 1484 state_ = STATE_UNBOUND; | 1484 state_ = STATE_UNBOUND; |
| 1485 port_->DestroyConnection(ext_addr_); | 1485 port_->DestroyConnection(ext_addr_); |
| 1486 } | 1486 } |
| 1487 } | 1487 } |
| 1488 void TurnEntry::OnChannelBindTimeout() { | 1488 void TurnEntry::OnChannelBindTimeout() { |
| 1489 state_ = STATE_UNBOUND; | 1489 state_ = STATE_UNBOUND; |
| 1490 port_->DestroyConnection(ext_addr_); | 1490 port_->DestroyConnection(ext_addr_); |
| 1491 } | 1491 } |
| 1492 } // namespace cricket | 1492 } // namespace cricket |
| OLD | NEW |