OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_listen_socket.h" | 5 #include "net/socket/tcp_listen_socket.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 // winsock2.h must be included first in order to ensure it is included before | 8 // winsock2.h must be included first in order to ensure it is included before |
9 // windows.h. | 9 // windows.h. |
10 #include <winsock2.h> | 10 #include <winsock2.h> |
11 #elif defined(OS_POSIX) | 11 #elif defined(OS_POSIX) |
| 12 #include <arpa/inet.h> |
12 #include <errno.h> | 13 #include <errno.h> |
| 14 #include <netinet/in.h> |
| 15 #include <sys/socket.h> |
13 #include <sys/types.h> | 16 #include <sys/types.h> |
14 #include <sys/socket.h> | |
15 #include <netinet/in.h> | |
16 #include <arpa/inet.h> | |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #endif | 18 #endif |
19 | 19 |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/sys_byteorder.h" | 21 #include "base/sys_byteorder.h" |
22 #include "base/threading/platform_thread.h" | 22 #include "base/threading/platform_thread.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
25 #include "net/base/winsock_init.h" | 25 #include "net/base/winsock_init.h" |
26 | 26 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 119 } |
120 | 120 |
121 TCPListenSocketFactory::~TCPListenSocketFactory() {} | 121 TCPListenSocketFactory::~TCPListenSocketFactory() {} |
122 | 122 |
123 scoped_refptr<StreamListenSocket> TCPListenSocketFactory::CreateAndListen( | 123 scoped_refptr<StreamListenSocket> TCPListenSocketFactory::CreateAndListen( |
124 StreamListenSocket::Delegate* delegate) const { | 124 StreamListenSocket::Delegate* delegate) const { |
125 return TCPListenSocket::CreateAndListen(ip_, port_, delegate); | 125 return TCPListenSocket::CreateAndListen(ip_, port_, delegate); |
126 } | 126 } |
127 | 127 |
128 } // namespace net | 128 } // namespace net |
OLD | NEW |