OLD | NEW |
---|---|
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 // For struct sockaddr and socklen_t. | 10 // For struct sockaddr and socklen_t. |
11 #if defined(OS_LINUX) || defined(OS_MACOSX) | 11 #if defined(OS_POSIX) |
12 #include <sys/types.h> | |
wtc
2010/01/30 00:09:16
<sys/types.h> should not need to be included for
<
Peter Valchev
2010/02/01 19:12:18
It is still required both on OpenBSD and FreeBSD:
| |
12 #include <sys/socket.h> | 13 #include <sys/socket.h> |
13 #elif defined(OS_WIN) | 14 #elif defined(OS_WIN) |
14 #include <ws2tcpip.h> | 15 #include <ws2tcpip.h> |
15 #endif | 16 #endif |
16 | 17 |
17 #include "net/socket/socket.h" | 18 #include "net/socket/socket.h" |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 class LoadLog; | 22 class LoadLog; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 virtual bool IsConnectedAndIdle() const = 0; | 58 virtual bool IsConnectedAndIdle() const = 0; |
58 | 59 |
59 // Identical to BSD socket call getpeername(). | 60 // Identical to BSD socket call getpeername(). |
60 // Needed by ssl_client_socket_nss and ssl_client_socket_mac. | 61 // Needed by ssl_client_socket_nss and ssl_client_socket_mac. |
61 virtual int GetPeerName(struct sockaddr* name, socklen_t* namelen) = 0; | 62 virtual int GetPeerName(struct sockaddr* name, socklen_t* namelen) = 0; |
62 }; | 63 }; |
63 | 64 |
64 } // namespace net | 65 } // namespace net |
65 | 66 |
66 #endif // NET_SOCKET_CLIENT_SOCKET_H_ | 67 #endif // NET_SOCKET_CLIENT_SOCKET_H_ |
OLD | NEW |