| 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 #include "net/base/tcp_client_socket_libevent.h" | 5 #include "net/base/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 | 11 |
| 12 #include "base/eintr_wrapper.h" | 12 #include "base/eintr_wrapper.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/trace_event.h" | 15 #include "base/trace_event.h" |
| 16 #include "net/base/io_buffer.h" |
| 16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 17 #include "third_party/libevent/event.h" | 18 #include "third_party/libevent/event.h" |
| 18 | 19 |
| 19 | 20 |
| 20 namespace net { | 21 namespace net { |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 const int kInvalidSocket = -1; | 25 const int kInvalidSocket = -1; |
| 25 | 26 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 DoWriteCallback(result); | 364 DoWriteCallback(result); |
| 364 } | 365 } |
| 365 } | 366 } |
| 366 | 367 |
| 367 int TCPClientSocketLibevent::GetPeerName(struct sockaddr *name, | 368 int TCPClientSocketLibevent::GetPeerName(struct sockaddr *name, |
| 368 socklen_t *namelen) { | 369 socklen_t *namelen) { |
| 369 return ::getpeername(socket_, name, namelen); | 370 return ::getpeername(socket_, name, namelen); |
| 370 } | 371 } |
| 371 | 372 |
| 372 } // namespace net | 373 } // namespace net |
| OLD | NEW |