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

Unified Diff: sdk/lib/io/http.dart

Issue 11348127: Make HTTP server close sockets when closed in idle state (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | sdk/lib/io/http_impl.dart » ('j') | tests/standalone/io/http_shutdown_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 79d16af00d8d3a0efc5bd4b63975e7197c65623c..bcfa93302b8f713c737c605b756584dec5068285 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -117,6 +117,41 @@ abstract class HttpServer {
* is 20 minutes.
*/
set sessionTimeout(int timeout);
+
+ /**
+ * Returns a [:HttpConnectionsInfo:] object with an overview of the
+ * current connection handled by the server.
+ */
+ HttpConnectionsInfo connectionsInfo();
+}
+
+
+/**
+ * Overview information of the [:HttpServer:] socket connections.
+ */
+class HttpConnectionsInfo {
+ /**
+ * Total number of socket connections.
+ */
+ int total = 0;
+
+ /**
+ * Number of active connections where actual request/response
+ * processing is active.
+ */
+ int active = 0;
+
+ /**
+ * Number of idle connections held by clients as persistent connections.
+ */
+ int idle = 0;
+
+ /**
+ * Number of connections which are preparing to close. Note: These
+ * connections are also part of the [:active:] count as they might
+ * still be sending data to the client before finally closing.
+ */
+ int closing = 0;
}
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | tests/standalone/io/http_shutdown_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698