| 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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ | 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 730 |
| 731 // Socket implementation. | 731 // Socket implementation. |
| 732 int Read(IOBuffer* buf, | 732 int Read(IOBuffer* buf, |
| 733 int buf_len, | 733 int buf_len, |
| 734 const CompletionCallback& callback) override; | 734 const CompletionCallback& callback) override; |
| 735 int Write(IOBuffer* buf, | 735 int Write(IOBuffer* buf, |
| 736 int buf_len, | 736 int buf_len, |
| 737 const CompletionCallback& callback) override; | 737 const CompletionCallback& callback) override; |
| 738 int SetReceiveBufferSize(int32_t size) override; | 738 int SetReceiveBufferSize(int32_t size) override; |
| 739 int SetSendBufferSize(int32_t size) override; | 739 int SetSendBufferSize(int32_t size) override; |
| 740 int SetDoNotFragment() override; |
| 740 | 741 |
| 741 // DatagramSocket implementation. | 742 // DatagramSocket implementation. |
| 742 void Close() override; | 743 void Close() override; |
| 743 int GetPeerAddress(IPEndPoint* address) const override; | 744 int GetPeerAddress(IPEndPoint* address) const override; |
| 744 int GetLocalAddress(IPEndPoint* address) const override; | 745 int GetLocalAddress(IPEndPoint* address) const override; |
| 745 void UseNonBlockingIO() override; | 746 void UseNonBlockingIO() override; |
| 746 const BoundNetLog& NetLog() const override; | 747 const BoundNetLog& NetLog() const override; |
| 747 | 748 |
| 748 // DatagramClientSocket implementation. | 749 // DatagramClientSocket implementation. |
| 749 int Connect(const IPEndPoint& address) override; | 750 int Connect(const IPEndPoint& address) override; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 | 1006 |
| 1006 // Helper function to get the total data size of the MockReads in |reads|. | 1007 // Helper function to get the total data size of the MockReads in |reads|. |
| 1007 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); | 1008 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); |
| 1008 | 1009 |
| 1009 // Helper function to get the total data size of the MockWrites in |writes|. | 1010 // Helper function to get the total data size of the MockWrites in |writes|. |
| 1010 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); | 1011 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); |
| 1011 | 1012 |
| 1012 } // namespace net | 1013 } // namespace net |
| 1013 | 1014 |
| 1014 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1015 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |