Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: mojo/services/network/tcp_server_socket_impl.h

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/public/cpp/bindings/interface_impl.h"
10 #include "mojo/services/network/public/interfaces/tcp_server_socket.mojom.h" 9 #include "mojo/services/network/public/interfaces/tcp_server_socket.mojom.h"
11 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
12 #include "net/socket/tcp_socket.h" 11 #include "net/socket/tcp_socket.h"
12 #include "mojo/public/cpp/bindings/interface_impl.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 class TCPServerSocketImpl : public InterfaceImpl<TCPServerSocket> { 16 class TCPServerSocketImpl : public InterfaceImpl<TCPServerSocket> {
17 public: 17 public:
18 typedef Callback<void(NetworkErrorPtr, NetAddressPtr)> AcceptCallback; 18 typedef Callback<void(NetworkErrorPtr, NetAddressPtr)> AcceptCallback;
19 19
20 // Passed ownership of a socket already in listening mode. 20 // Passed ownership of a socket already in listening mode.
21 explicit TCPServerSocketImpl(scoped_ptr<net::TCPSocket> socket); 21 explicit TCPServerSocketImpl(scoped_ptr<net::TCPSocket> socket);
22 ~TCPServerSocketImpl() override; 22 ~TCPServerSocketImpl() override;
(...skipping 18 matching lines...) Expand all
41 InterfaceRequest<TCPConnectedSocket> pending_client_socket_; 41 InterfaceRequest<TCPConnectedSocket> pending_client_socket_;
42 42
43 // These are written to by net::TCPSocket when Accept is completed. 43 // These are written to by net::TCPSocket when Accept is completed.
44 scoped_ptr<net::TCPSocket> accepted_socket_; 44 scoped_ptr<net::TCPSocket> accepted_socket_;
45 net::IPEndPoint accepted_address_; 45 net::IPEndPoint accepted_address_;
46 }; 46 };
47 47
48 } // namespace mojo 48 } // namespace mojo
49 49
50 #endif // MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_ 50 #endif // MOJO_SERVICES_NETWORK_TCP_SERVER_SOCKET_H_
OLDNEW
« no previous file with comments | « mojo/services/network/tcp_connected_socket_impl.h ('k') | mojo/services/network/udp_socket_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698