| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void TestGetSetOptionsIPv4(); | 58 void TestGetSetOptionsIPv4(); |
| 59 void TestGetSetOptionsIPv6(); | 59 void TestGetSetOptionsIPv6(); |
| 60 void TestSocketRecvTimestamp(); | 60 void TestSocketRecvTimestamp(); |
| 61 | 61 |
| 62 static const int kTimeout = 5000; // ms | 62 static const int kTimeout = 5000; // ms |
| 63 const IPAddress kIPv4Loopback; | 63 const IPAddress kIPv4Loopback; |
| 64 const IPAddress kIPv6Loopback; | 64 const IPAddress kIPv6Loopback; |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 void TcpInternal(const IPAddress& loopback, size_t data_size, | 67 void TcpInternal(const IPAddress& loopback, size_t data_size, |
| 68 ptrdiff_t max_send_size); | 68 ssize_t max_send_size); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 void ConnectInternal(const IPAddress& loopback); | 71 void ConnectInternal(const IPAddress& loopback); |
| 72 void ConnectWithDnsLookupInternal(const IPAddress& loopback, | 72 void ConnectWithDnsLookupInternal(const IPAddress& loopback, |
| 73 const std::string& host); | 73 const std::string& host); |
| 74 void ConnectFailInternal(const IPAddress& loopback); | 74 void ConnectFailInternal(const IPAddress& loopback); |
| 75 | 75 |
| 76 void ConnectWithDnsLookupFailInternal(const IPAddress& loopback); | 76 void ConnectWithDnsLookupFailInternal(const IPAddress& loopback); |
| 77 void ConnectWithClosedSocketInternal(const IPAddress& loopback); | 77 void ConnectWithClosedSocketInternal(const IPAddress& loopback); |
| 78 void ConnectWhileNotClosedInternal(const IPAddress& loopback); | 78 void ConnectWhileNotClosedInternal(const IPAddress& loopback); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 90 SocketServer* ss_; | 90 SocketServer* ss_; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 // For unbound sockets, GetLocalAddress / GetRemoteAddress return AF_UNSPEC | 93 // For unbound sockets, GetLocalAddress / GetRemoteAddress return AF_UNSPEC |
| 94 // values on Windows, but an empty address of the same family on Linux/MacOS X. | 94 // values on Windows, but an empty address of the same family on Linux/MacOS X. |
| 95 bool IsUnspecOrEmptyIP(const IPAddress& address); | 95 bool IsUnspecOrEmptyIP(const IPAddress& address); |
| 96 | 96 |
| 97 } // namespace rtc | 97 } // namespace rtc |
| 98 | 98 |
| 99 #endif // WEBRTC_BASE_SOCKET_UNITTEST_H_ | 99 #endif // WEBRTC_BASE_SOCKET_UNITTEST_H_ |
| OLD | NEW |