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

Unified Diff: mojo/services/public/interfaces/network/tcp_server_socket.mojom

Issue 634713002: Implement parts of the Mojo TCP interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing file in gyp 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/interfaces/network/tcp_server_socket.mojom
diff --git a/mojo/services/public/interfaces/network/tcp_server_socket.mojom b/mojo/services/public/interfaces/network/tcp_server_socket.mojom
index 4b2e5966d611a827b2f3e4c7dc75eaf7649da247..997f7e841736a7727bafb7079f44d04ba4e8bba2 100644
--- a/mojo/services/public/interfaces/network/tcp_server_socket.mojom
+++ b/mojo/services/public/interfaces/network/tcp_server_socket.mojom
@@ -4,31 +4,21 @@
import "mojo/services/public/interfaces/network/net_address.mojom"
import "mojo/services/public/interfaces/network/network_error.mojom"
-import "mojo/services/public/interfaces/network/tcp_client_socket.mojom"
+import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom"
module mojo {
// Represents a TCP server socket listening for incoming requests.
-[Client=TCPServerSocketClient]
interface TCPServerSocket {
- // Accepts an incoming connection request and hooks up a TCPClientSocket for
- // connecting with the remote host. This function is called in reponse to
- // OnConnectionAvailable().
+ // Waits for an incoming connection request and hooks up a TCPConnectedSocket
+ // for connecting with the remote host. Only one Accept call can be pending
+ // at a time.
//
// On success, the address of the remote host will be provided.
- AcceptConnection(handle<data_pipe_consumer> send_stream,
- handle<data_pipe_producer> receive_stream,
- TCPClientSocket& client_socket)
+ Accept(handle<data_pipe_consumer> send_stream,
+ handle<data_pipe_producer> receive_stream,
+ TCPConnectedSocket& client_socket)
=> (NetworkError result, NetAddress? remote_address);
};
-interface TCPServerSocketClient {
- // Notifies the client that an incoming connection is available.
- //
- // The client should call AcceptConnection() to accept the request.
- OnConnectionAvailable();
-
- // TODO(brettw) probably need some error reporting function here.
-};
-
}
« no previous file with comments | « mojo/services/public/interfaces/network/tcp_connected_socket.mojom ('k') | mojo/services/public/mojo_services_public.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698