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/stream_listen_socket.h" | 5 #include "net/base/stream_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 <errno.h> | 12 #include <errno.h> |
13 #include <sys/types.h> | 13 #include <sys/types.h> |
14 #include <sys/socket.h> | 14 #include <sys/socket.h> |
15 #include <netinet/in.h> | 15 #include <netinet/in.h> |
16 #include <arpa/inet.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/eintr_wrapper.h" | |
21 #include "base/logging.h" | 20 #include "base/logging.h" |
22 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
23 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" |
| 23 #include "base/posix/eintr_wrapper.h" |
24 #include "base/sys_byteorder.h" | 24 #include "base/sys_byteorder.h" |
25 #include "base/threading/platform_thread.h" | 25 #include "base/threading/platform_thread.h" |
26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
27 #include "net/base/ip_endpoint.h" | 27 #include "net/base/ip_endpoint.h" |
28 #include "net/base/net_errors.h" | 28 #include "net/base/net_errors.h" |
29 #include "net/base/net_util.h" | 29 #include "net/base/net_util.h" |
30 | 30 |
31 using std::string; | 31 using std::string; |
32 | 32 |
33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 void StreamListenSocket::ResumeReads() { | 294 void StreamListenSocket::ResumeReads() { |
295 DCHECK(reads_paused_); | 295 DCHECK(reads_paused_); |
296 reads_paused_ = false; | 296 reads_paused_ = false; |
297 if (has_pending_reads_) { | 297 if (has_pending_reads_) { |
298 has_pending_reads_ = false; | 298 has_pending_reads_ = false; |
299 Read(); | 299 Read(); |
300 } | 300 } |
301 } | 301 } |
302 | 302 |
303 } // namespace net | 303 } // namespace net |
OLD | NEW |