| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BASE_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_H_ |
| 6 #define NET_BASE_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 #if defined(OS_LINUX) | 10 #if defined(OS_LINUX) |
| 11 #include <sys/socket.h> | 11 #include <sys/socket.h> |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 #include "net/base/socket.h" | 14 #include "net/socket/socket.h" |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 | 17 |
| 18 class ClientSocket : public Socket { | 18 class ClientSocket : public Socket { |
| 19 public: | 19 public: |
| 20 // Called to establish a connection. Returns OK if the connection could be | 20 // Called to establish a connection. Returns OK if the connection could be |
| 21 // established synchronously. Otherwise, ERR_IO_PENDING is returned and the | 21 // established synchronously. Otherwise, ERR_IO_PENDING is returned and the |
| 22 // given callback will run asynchronously when the connection is established | 22 // given callback will run asynchronously when the connection is established |
| 23 // or when an error occurs. The result is some other error code if the | 23 // or when an error occurs. The result is some other error code if the |
| 24 // connection could not be established. | 24 // connection could not be established. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 49 | 49 |
| 50 #if defined(OS_LINUX) | 50 #if defined(OS_LINUX) |
| 51 // Identical to posix system call getpeername(). | 51 // Identical to posix system call getpeername(). |
| 52 // Needed by ssl_client_socket_nss. | 52 // Needed by ssl_client_socket_nss. |
| 53 virtual int GetPeerName(struct sockaddr *name, socklen_t *namelen); | 53 virtual int GetPeerName(struct sockaddr *name, socklen_t *namelen); |
| 54 #endif | 54 #endif |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace net | 57 } // namespace net |
| 58 | 58 |
| 59 #endif // NET_BASE_CLIENT_SOCKET_H_ | 59 #endif // NET_SOCKET_CLIENT_SOCKET_H_ |
| OLD | NEW |