| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 nat_->internal_tcp_address())) { | 329 nat_->internal_tcp_address())) { |
| 330 int_thread_->Start(); | 330 int_thread_->Start(); |
| 331 ext_thread_->Start(); | 331 ext_thread_->Start(); |
| 332 } | 332 } |
| 333 | 333 |
| 334 void OnConnectEvent(AsyncSocket* socket) { | 334 void OnConnectEvent(AsyncSocket* socket) { |
| 335 connected_ = true; | 335 connected_ = true; |
| 336 } | 336 } |
| 337 | 337 |
| 338 void OnAcceptEvent(AsyncSocket* socket) { | 338 void OnAcceptEvent(AsyncSocket* socket) { |
| 339 accepted_.reset(server_->Accept(NULL)); | 339 accepted_.reset(server_->Accept(nullptr)); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void OnCloseEvent(AsyncSocket* socket, int error) { | 342 void OnCloseEvent(AsyncSocket* socket, int error) { |
| 343 } | 343 } |
| 344 | 344 |
| 345 void ConnectEvents() { | 345 void ConnectEvents() { |
| 346 server_->SignalReadEvent.connect(this, &NatTcpTest::OnAcceptEvent); | 346 server_->SignalReadEvent.connect(this, &NatTcpTest::OnAcceptEvent); |
| 347 client_->SignalConnectEvent.connect(this, &NatTcpTest::OnConnectEvent); | 347 client_->SignalConnectEvent.connect(this, &NatTcpTest::OnConnectEvent); |
| 348 } | 348 } |
| 349 | 349 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 size_t len = strlen(buf); | 386 size_t len = strlen(buf); |
| 387 | 387 |
| 388 in->Send(buf, len); | 388 in->Send(buf, len); |
| 389 SocketAddress trans_addr; | 389 SocketAddress trans_addr; |
| 390 EXPECT_TRUE(out->CheckNextPacket(buf, len, &trans_addr)); | 390 EXPECT_TRUE(out->CheckNextPacket(buf, len, &trans_addr)); |
| 391 | 391 |
| 392 out->Send(buf, len); | 392 out->Send(buf, len); |
| 393 EXPECT_TRUE(in->CheckNextPacket(buf, len, &trans_addr)); | 393 EXPECT_TRUE(in->CheckNextPacket(buf, len, &trans_addr)); |
| 394 } | 394 } |
| 395 // #endif | 395 // #endif |
| OLD | NEW |