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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 740 |
741 // DatagramSocket implementation. | 741 // DatagramSocket implementation. |
742 void Close() override; | 742 void Close() override; |
743 int GetPeerAddress(IPEndPoint* address) const override; | 743 int GetPeerAddress(IPEndPoint* address) const override; |
744 int GetLocalAddress(IPEndPoint* address) const override; | 744 int GetLocalAddress(IPEndPoint* address) const override; |
| 745 void UseNonBlockingIO() override; |
745 const BoundNetLog& NetLog() const override; | 746 const BoundNetLog& NetLog() const override; |
746 | 747 |
747 // DatagramClientSocket implementation. | 748 // DatagramClientSocket implementation. |
748 int Connect(const IPEndPoint& address) override; | 749 int Connect(const IPEndPoint& address) override; |
749 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, | 750 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, |
750 const IPEndPoint& address) override; | 751 const IPEndPoint& address) override; |
751 int ConnectUsingDefaultNetwork(const IPEndPoint& address) override; | 752 int ConnectUsingDefaultNetwork(const IPEndPoint& address) override; |
752 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override; | 753 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override; |
753 | 754 |
754 // AsyncSocket implementation. | 755 // AsyncSocket implementation. |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 | 1005 |
1005 // Helper function to get the total data size of the MockReads in |reads|. | 1006 // Helper function to get the total data size of the MockReads in |reads|. |
1006 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); | 1007 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); |
1007 | 1008 |
1008 // Helper function to get the total data size of the MockWrites in |writes|. | 1009 // Helper function to get the total data size of the MockWrites in |writes|. |
1009 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); | 1010 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); |
1010 | 1011 |
1011 } // namespace net | 1012 } // namespace net |
1012 | 1013 |
1013 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1014 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |