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

Unified Diff: runtime/bin/http.dart

Issue 10803033: Add the ability to get info of a Http connection, e.g. host and port. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http.dart
diff --git a/runtime/bin/http.dart b/runtime/bin/http.dart
index be5d21f5f3d4bb76b4320ef202eebe95ec7606cd..deb3ee992f498917a875589cb602b324679d7904 100644
--- a/runtime/bin/http.dart
+++ b/runtime/bin/http.dart
@@ -555,6 +555,12 @@ interface HttpRequest default _HttpRequest {
* be "1.0" or "1.1".
*/
String get protocolVersion();
+
+ /**
+ * Get information about the client connection. Returns [null] if the socket
+ * isn't available.
+ */
+ HttpConnectionInfo get connectionInfo();
}
@@ -619,6 +625,12 @@ interface HttpResponse default _HttpResponse {
* and the communication should continue with a different protocol.
*/
DetachedSocket detachSocket();
+
+ /**
+ * Get information about the client connection. Returns [null] if the socket
+ * isn't available.
+ */
+ HttpConnectionInfo get connectionInfo();
}
@@ -756,6 +768,12 @@ interface HttpClientConnection {
* communication should continue with a different protocol.
*/
DetachedSocket detachSocket();
+
+ /**
+ * Get information about the client connection. Returns [null] if the socket
+ * isn't available.
+ */
+ HttpConnectionInfo get connectionInfo();
}
@@ -849,6 +867,15 @@ interface HttpClientResponse default _HttpClientResponse {
InputStream get inputStream();
}
+/**
+ * Connection information.
+ */
+interface HttpConnectionInfo {
+ String get remoteHost();
+ String get remotePort();
+ String get localPort();
ricow1 2012/07/19 14:32:28 int?
Anders Johnsen 2012/07/19 14:33:36 Heh, right :)
+}
+
/**
* Redirect information.
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698