| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SOCKET_TCP_SERVER_SOCKET_WIN_H_ | 5 #ifndef NET_SOCKET_TCP_SERVER_SOCKET_WIN_H_ |
| 6 #define NET_SOCKET_TCP_SERVER_SOCKET_WIN_H_ | 6 #define NET_SOCKET_TCP_SERVER_SOCKET_WIN_H_ |
| 7 | 7 |
| 8 #include <winsock2.h> | 8 #include <winsock2.h> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/win/object_watcher.h" | 12 #include "base/win/object_watcher.h" |
| 13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
| 14 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
| 15 #include "net/socket/server_socket.h" | 15 #include "net/socket/server_socket.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 class IPEndPoint; | 19 class IPEndPoint; |
| 20 | 20 |
| 21 class NET_TEST TCPServerSocketWin | 21 class NET_EXPORT_PRIVATE TCPServerSocketWin |
| 22 : public ServerSocket, | 22 : public ServerSocket, |
| 23 NON_EXPORTED_BASE(public base::NonThreadSafe), | 23 NON_EXPORTED_BASE(public base::NonThreadSafe), |
| 24 public base::win::ObjectWatcher::Delegate { | 24 public base::win::ObjectWatcher::Delegate { |
| 25 public: | 25 public: |
| 26 TCPServerSocketWin(net::NetLog* net_log, | 26 TCPServerSocketWin(net::NetLog* net_log, |
| 27 const net::NetLog::Source& source); | 27 const net::NetLog::Source& source); |
| 28 ~TCPServerSocketWin(); | 28 ~TCPServerSocketWin(); |
| 29 | 29 |
| 30 // net::ServerSocket implementation. | 30 // net::ServerSocket implementation. |
| 31 virtual int Listen(const net::IPEndPoint& address, int backlog); | 31 virtual int Listen(const net::IPEndPoint& address, int backlog); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 47 | 47 |
| 48 scoped_ptr<StreamSocket>* accept_socket_; | 48 scoped_ptr<StreamSocket>* accept_socket_; |
| 49 CompletionCallback* accept_callback_; | 49 CompletionCallback* accept_callback_; |
| 50 | 50 |
| 51 BoundNetLog net_log_; | 51 BoundNetLog net_log_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace net | 54 } // namespace net |
| 55 | 55 |
| 56 #endif // NET_SOCKET_TCP_SERVER_SOCKET_WIN_H_ | 56 #endif // NET_SOCKET_TCP_SERVER_SOCKET_WIN_H_ |
| OLD | NEW |