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

Side by Side Diff: mojo/services/public/interfaces/network/network_service.mojom

Issue 657113002: Add basic TCP socket mojo implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 import "mojo/services/public/interfaces/network/cookie_store.mojom" 5 import "mojo/services/public/interfaces/network/cookie_store.mojom"
6 import "mojo/services/public/interfaces/network/net_address.mojom" 6 import "mojo/services/public/interfaces/network/net_address.mojom"
7 import "mojo/services/public/interfaces/network/network_error.mojom" 7 import "mojo/services/public/interfaces/network/network_error.mojom"
8 import "mojo/services/public/interfaces/network/tcp_bound_socket.mojom" 8 import "mojo/services/public/interfaces/network/tcp_bound_socket.mojom"
9 import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom" 9 import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom"
10 import "mojo/services/public/interfaces/network/udp_socket.mojom" 10 import "mojo/services/public/interfaces/network/udp_socket.mojom"
(...skipping 27 matching lines...) Expand all
38 CreateTCPBoundSocket(NetAddress? local_address, 38 CreateTCPBoundSocket(NetAddress? local_address,
39 TCPBoundSocket& bound_socket) 39 TCPBoundSocket& bound_socket)
40 => (NetworkError result, NetAddress? bound_to); 40 => (NetworkError result, NetAddress? bound_to);
41 41
42 // Creates a client socket connected to the given remote address. A local 42 // Creates a client socket connected to the given remote address. A local
43 // address and port will be allocated for the connection and passed to the 43 // address and port will be allocated for the connection and passed to the
44 // callback on success. 44 // callback on success.
45 // 45 //
46 // If you want control over the local address and port, instead use 46 // If you want control over the local address and port, instead use
47 // CreateTCPBoundSocket. 47 // CreateTCPBoundSocket.
48 //
49 // IMPORTANT: This does not work yet! We need to add a new parameter to
50 // indicate the protocol type (IPv4 or IPv6) actually be able to create the
51 // right type of socket. We also need to figure out how the client is supposed
52 // to decide between IPv4 and IPv6 on a given system.
48 CreateTCPConnectedSocket(NetAddress remote_address, 53 CreateTCPConnectedSocket(NetAddress remote_address,
49 handle<data_pipe_consumer> send_stream, 54 handle<data_pipe_consumer> send_stream,
50 handle<data_pipe_producer> receive_stream, 55 handle<data_pipe_producer> receive_stream,
51 TCPConnectedSocket& client_socket) 56 TCPConnectedSocket& client_socket)
52 => (NetworkError result, 57 => (NetworkError result,
53 NetAddress? local_address); 58 NetAddress? local_address);
54 59
55 CreateUDPSocket(UDPSocket& socket); 60 CreateUDPSocket(UDPSocket& socket);
56 }; 61 };
57 62
58 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698