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

Unified Diff: runtime/bin/service_object_patch.dart

Issue 300043011: Add WebSockets to Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Deploy Created 6 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
« no previous file with comments | « no previous file | runtime/bin/socket_patch.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 d0056dffb360af9748a619cf95e7789af1cb95ff..fadae3718604500bde0f9aed15569d753a6d90a3 100644
--- a/runtime/bin/service_object_patch.dart
+++ b/runtime/bin/service_object_patch.dart
@@ -8,6 +8,7 @@ final Map _servicePathMap = {
'servers' : _httpServersServiceObject,
},
'sockets' : _socketsServiceObject,
+ 'websockets' : _webSocketsServiceObject,
'file' : {
'randomaccessfiles' : _randomAccessFilesServiceObject
},
@@ -81,6 +82,22 @@ Map _socketsServiceObject(args) {
};
}
+Map _webSocketsServiceObject(args) {
+ if (args.length == 1) {
+ var webSocket = _WebSocketImpl._webSockets[int.parse(args.first)];
+ if (webSocket == null) {
+ return {};
+ }
+ return webSocket._toJSON(false);
+ }
+ return {
+ 'id': 'io/websockets',
+ 'type': 'WebSocketList',
+ 'members': _WebSocketImpl._webSockets.values
+ .map((webSocket) => webSocket._toJSON(true)).toList(),
+ };
+}
+
Map _randomAccessFilesServiceObject(args) {
if (args.length == 1) {
var raf = _RandomAccessFile._files[int.parse(args.first)];
« no previous file with comments | « no previous file | runtime/bin/socket_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698