OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 WrongAddressWriter() { | 943 WrongAddressWriter() { |
944 IPAddressNumber ip; | 944 IPAddressNumber ip; |
945 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &ip)); | 945 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &ip)); |
946 self_address_ = IPEndPoint(ip, 0); | 946 self_address_ = IPEndPoint(ip, 0); |
947 } | 947 } |
948 | 948 |
949 virtual WriteResult WritePacket( | 949 virtual WriteResult WritePacket( |
950 const char* buffer, | 950 const char* buffer, |
951 size_t buf_len, | 951 size_t buf_len, |
952 const IPAddressNumber& real_self_address, | 952 const IPAddressNumber& real_self_address, |
953 const IPEndPoint& peer_address) OVERRIDE { | 953 const IPEndPoint& peer_address, |
| 954 base::Callback<void(WriteResult wr)> callback) OVERRIDE { |
954 // Use wrong address! | 955 // Use wrong address! |
955 return QuicPacketWriterWrapper::WritePacket( | 956 return QuicPacketWriterWrapper::WritePacket( |
956 buffer, buf_len, self_address_.address(), peer_address); | 957 buffer, buf_len, self_address_.address(), peer_address, callback); |
957 } | 958 } |
958 | 959 |
959 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { | 960 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { |
960 return false; | 961 return false; |
961 } | 962 } |
962 | 963 |
963 IPEndPoint self_address_; | 964 IPEndPoint self_address_; |
964 }; | 965 }; |
965 | 966 |
966 TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) { | 967 TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 QuicSession* session = dispatcher->session_map().begin()->second; | 1068 QuicSession* session = dispatcher->session_map().begin()->second; |
1068 EXPECT_EQ(kClientIFCW, | 1069 EXPECT_EQ(kClientIFCW, |
1069 session->config()->ReceivedInitialFlowControlWindowBytes()); | 1070 session->config()->ReceivedInitialFlowControlWindowBytes()); |
1070 server_thread_->Resume(); | 1071 server_thread_->Resume(); |
1071 } | 1072 } |
1072 | 1073 |
1073 } // namespace | 1074 } // namespace |
1074 } // namespace test | 1075 } // namespace test |
1075 } // namespace tools | 1076 } // namespace tools |
1076 } // namespace net | 1077 } // namespace net |
OLD | NEW |