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 "net/socket/socket_test_util.h" | 5 #include "net/socket/socket_test_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 } | 1324 } |
1325 | 1325 |
1326 int MockUDPClientSocket::SetReceiveBufferSize(int32_t size) { | 1326 int MockUDPClientSocket::SetReceiveBufferSize(int32_t size) { |
1327 return OK; | 1327 return OK; |
1328 } | 1328 } |
1329 | 1329 |
1330 int MockUDPClientSocket::SetSendBufferSize(int32_t size) { | 1330 int MockUDPClientSocket::SetSendBufferSize(int32_t size) { |
1331 return OK; | 1331 return OK; |
1332 } | 1332 } |
1333 | 1333 |
| 1334 int MockUDPClientSocket::SetDoNotFragment() { |
| 1335 return OK; |
| 1336 } |
| 1337 |
1334 void MockUDPClientSocket::Close() { | 1338 void MockUDPClientSocket::Close() { |
1335 connected_ = false; | 1339 connected_ = false; |
1336 } | 1340 } |
1337 | 1341 |
1338 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const { | 1342 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const { |
1339 *address = peer_addr_; | 1343 *address = peer_addr_; |
1340 return OK; | 1344 return OK; |
1341 } | 1345 } |
1342 | 1346 |
1343 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const { | 1347 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const { |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 } | 1731 } |
1728 | 1732 |
1729 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { | 1733 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { |
1730 int64_t total = 0; | 1734 int64_t total = 0; |
1731 for (const MockWrite* write = writes; write != writes + writes_size; ++write) | 1735 for (const MockWrite* write = writes; write != writes + writes_size; ++write) |
1732 total += write->data_len; | 1736 total += write->data_len; |
1733 return total; | 1737 return total; |
1734 } | 1738 } |
1735 | 1739 |
1736 } // namespace net | 1740 } // namespace net |
OLD | NEW |