| OLD | NEW |
| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 return CreateTurnPort(addr, socket_factory, int_proto, ext_proto, | 529 return CreateTurnPort(addr, socket_factory, int_proto, ext_proto, |
| 530 server_addr); | 530 server_addr); |
| 531 } | 531 } |
| 532 TurnPort* CreateTurnPort(const SocketAddress& addr, | 532 TurnPort* CreateTurnPort(const SocketAddress& addr, |
| 533 PacketSocketFactory* socket_factory, | 533 PacketSocketFactory* socket_factory, |
| 534 ProtocolType int_proto, ProtocolType ext_proto, | 534 ProtocolType int_proto, ProtocolType ext_proto, |
| 535 const rtc::SocketAddress& server_addr) { | 535 const rtc::SocketAddress& server_addr) { |
| 536 return TurnPort::Create(&main_, socket_factory, MakeNetwork(addr), 0, 0, | 536 return TurnPort::Create(&main_, socket_factory, MakeNetwork(addr), 0, 0, |
| 537 username_, password_, | 537 username_, password_, |
| 538 ProtocolAddress(server_addr, int_proto), | 538 ProtocolAddress(server_addr, int_proto), |
| 539 kRelayCredentials, 0, std::string()); | 539 kRelayCredentials, 0, std::string(), |
| 540 std::vector<std::string>()); |
| 540 } | 541 } |
| 541 RelayPort* CreateGturnPort(const SocketAddress& addr, | 542 RelayPort* CreateGturnPort(const SocketAddress& addr, |
| 542 ProtocolType int_proto, ProtocolType ext_proto) { | 543 ProtocolType int_proto, ProtocolType ext_proto) { |
| 543 RelayPort* port = CreateGturnPort(addr); | 544 RelayPort* port = CreateGturnPort(addr); |
| 544 SocketAddress addrs[] = | 545 SocketAddress addrs[] = |
| 545 { kRelayUdpIntAddr, kRelayTcpIntAddr, kRelaySslTcpIntAddr }; | 546 { kRelayUdpIntAddr, kRelayTcpIntAddr, kRelaySslTcpIntAddr }; |
| 546 port->AddServerAddress(ProtocolAddress(addrs[int_proto], int_proto)); | 547 port->AddServerAddress(ProtocolAddress(addrs[int_proto], int_proto)); |
| 547 return port; | 548 return port; |
| 548 } | 549 } |
| 549 RelayPort* CreateGturnPort(const SocketAddress& addr) { | 550 RelayPort* CreateGturnPort(const SocketAddress& addr) { |
| (...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2889 port->CreateConnection(candidate, Port::ORIGIN_MESSAGE); | 2890 port->CreateConnection(candidate, Port::ORIGIN_MESSAGE); |
| 2890 EXPECT_NE(conn1, conn2); | 2891 EXPECT_NE(conn1, conn2); |
| 2891 conn_in_use = port->GetConnection(address); | 2892 conn_in_use = port->GetConnection(address); |
| 2892 EXPECT_EQ(conn2, conn_in_use); | 2893 EXPECT_EQ(conn2, conn_in_use); |
| 2893 EXPECT_EQ(2u, conn_in_use->remote_candidate().generation()); | 2894 EXPECT_EQ(2u, conn_in_use->remote_candidate().generation()); |
| 2894 | 2895 |
| 2895 // Make sure the new connection was not deleted. | 2896 // Make sure the new connection was not deleted. |
| 2896 rtc::Thread::Current()->ProcessMessages(300); | 2897 rtc::Thread::Current()->ProcessMessages(300); |
| 2897 EXPECT_TRUE(port->GetConnection(address) != nullptr); | 2898 EXPECT_TRUE(port->GetConnection(address) != nullptr); |
| 2898 } | 2899 } |
| OLD | NEW |