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

Unified Diff: runtime/bin/service_object_patch.dart

Issue 302173007: Add HttpServerConnection to Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test. Created 6 years, 6 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/vmservice/client/lib/src/elements/io_view.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/service_object_patch.dart
diff --git a/runtime/bin/service_object_patch.dart b/runtime/bin/service_object_patch.dart
index 7f2e0d84855ad1ec5e920bb182b9d163e060cf20..348e3b23bbd42f2fc432e944b87cab1a2c9eb619 100644
--- a/runtime/bin/service_object_patch.dart
+++ b/runtime/bin/service_object_patch.dart
@@ -6,6 +6,7 @@
final Map _servicePathMap = {
'http' : {
'servers' : _httpServersServiceObject,
+ 'serverconnections' : _httpServerConnectionsServiceObject,
},
'sockets' : _socketsServiceObject,
'websockets' : _webSocketsServiceObject,
@@ -87,6 +88,17 @@ Map _httpServersServiceObject(args) {
};
}
+Map _httpServerConnectionsServiceObject(args) {
+ if (args.length == 1) {
+ var connection = _HttpConnection._connections[int.parse(args.first)];
+ if (connection == null) {
+ return {};
+ }
+ return connection._toJSON(false);
+ }
+ return _makeServiceError("http/serverconnections can not be listed");
+}
+
Map _socketsServiceObject(args) {
if (args.length == 1) {
var socket = _NativeSocket._sockets[int.parse(args.first)];
« no previous file with comments | « no previous file | runtime/bin/vmservice/client/lib/src/elements/io_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698