| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ |
| 6 #define MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ | 6 #define MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "mojo/services/network/public/interfaces/tcp_server_socket.mojom.h" | 9 #include "mojo/services/network/interfaces/tcp_server_socket.mojom.h" |
| 10 #include "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
| 11 #include "net/socket/tcp_socket.h" | 11 #include "net/socket/tcp_socket.h" |
| 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 | 15 |
| 16 class TCPServerSocketImpl : public TCPServerSocket { | 16 class TCPServerSocketImpl : public TCPServerSocket { |
| 17 public: | 17 public: |
| 18 typedef Callback<void(NetworkErrorPtr, NetAddressPtr)> AcceptCallback; | 18 typedef Callback<void(NetworkErrorPtr, NetAddressPtr)> AcceptCallback; |
| 19 | 19 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 43 InterfaceRequest<TCPConnectedSocket> pending_client_socket_; | 43 InterfaceRequest<TCPConnectedSocket> pending_client_socket_; |
| 44 | 44 |
| 45 // These are written to by net::TCPSocket when Accept is completed. | 45 // These are written to by net::TCPSocket when Accept is completed. |
| 46 scoped_ptr<net::TCPSocket> accepted_socket_; | 46 scoped_ptr<net::TCPSocket> accepted_socket_; |
| 47 net::IPEndPoint accepted_address_; | 47 net::IPEndPoint accepted_address_; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace mojo | 50 } // namespace mojo |
| 51 | 51 |
| 52 #endif // MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ | 52 #endif // MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ |
| OLD | NEW |