OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "net/socket/tcp_client_socket_libevent.h" | 5 #include "net/socket/tcp_client_socket_libevent.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <netdb.h> | 9 #include <netdb.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
11 #include <netinet/tcp.h> | 11 #include <netinet/tcp.h> |
| 12 #if defined(OS_POSIX) |
| 13 #include <netinet/in.h> |
| 14 #endif |
12 | 15 |
13 #include "base/eintr_wrapper.h" | 16 #include "base/eintr_wrapper.h" |
14 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
15 #include "base/string_util.h" | 18 #include "base/string_util.h" |
16 #include "base/trace_event.h" | 19 #include "base/trace_event.h" |
17 #include "net/base/io_buffer.h" | 20 #include "net/base/io_buffer.h" |
18 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
19 #include "net/base/net_log.h" | 22 #include "net/base/net_log.h" |
20 #if defined(USE_SYSTEM_LIBEVENT) | 23 #if defined(USE_SYSTEM_LIBEVENT) |
21 #include <event.h> | 24 #include <event.h> |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 478 |
476 int TCPClientSocketLibevent::GetPeerAddress(AddressList* address) const { | 479 int TCPClientSocketLibevent::GetPeerAddress(AddressList* address) const { |
477 DCHECK(address); | 480 DCHECK(address); |
478 if (!current_ai_) | 481 if (!current_ai_) |
479 return ERR_UNEXPECTED; | 482 return ERR_UNEXPECTED; |
480 address->Copy(current_ai_, false); | 483 address->Copy(current_ai_, false); |
481 return OK; | 484 return OK; |
482 } | 485 } |
483 | 486 |
484 } // namespace net | 487 } // namespace net |
OLD | NEW |