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

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

Issue 1136773002: Add HTTP server mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/network/public/interfaces/http_connection.mojom
diff --git a/mojo/services/network/public/interfaces/http_connection.mojom b/mojo/services/network/public/interfaces/http_connection.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..d6fe5ef8faaae21fa4a03ec0ed49f493269aab7e
--- /dev/null
+++ b/mojo/services/network/public/interfaces/http_connection.mojom
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo;
+
+import "network/public/interfaces/url_loader.mojom";
+import "network/public/interfaces/network_error.mojom";
+import "network/public/interfaces/web_socket.mojom";
+
+interface HttpConnection {
+ // Sets the OS send buffer size (in bytes) for the underlying socket.
+ SetSendBufferSize(uint32 size) => (NetworkError result);
+
+ // Sets the OS receive buffer size (in bytes) for the underlying socket.
+ SetReceiveBufferSize(uint32 size) => (NetworkError result);
+};
+
+interface HttpConnectionDelegate {
+ // Called when an HTTP request is received.
+ OnReceivedRequest(URLRequest request) => (URLResponse response);
+
+ // Called with an WebSocket request is received.
+ //
+ // If the delegate decides to accept the request, it should respond with
+ // non-null arguments in the callback. |send_stream| is a data pipe which
+ // should remain open for the lifetime of the WebSocket. Data to send over the
+ // WebSocket should be written to the producer end of the |send_stream|.
+ // |web_socket| will be already connected. There is no need to call Connect()
+ // on it. But |client| will still receive a DidConnect() notification.
+ OnReceivedWebSocketRequest(URLRequest request)
+ => (WebSocket&? web_socket,
+ handle<data_pipe_consumer>? send_stream,
+ WebSocketClient? client);
+};
« no previous file with comments | « mojo/services/network/public/interfaces/BUILD.gn ('k') | mojo/services/network/public/interfaces/http_server.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698