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

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

Issue 297213005: Add Socket ref to HttpServer. (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 | « runtime/bin/vmservice/client/lib/src/elements/service_view.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index e9b610e00fedc9aa32c6c885e65b1935b9dc5e3f..ab850f0446d999a79697e102407a61b7a880f922 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -2041,9 +2041,6 @@ class _HttpServer
// Use default Map so we keep order.
static Map<int, _HttpServer> _servers = new Map<int, _HttpServer>();
- final String _serviceTypePath = 'io/http/servers';
- final String _serviceTypeName = 'HttpServer';
-
String serverHeader;
Duration _idleTimeout;
@@ -2226,6 +2223,9 @@ class _HttpServer
return result;
}
+ String get _serviceTypePath => 'io/http/servers';
+ String get _serviceTypeName => 'HttpServer';
+
Map _toJSON(bool ref) {
var r = {
'id': _servicePath,
@@ -2236,6 +2236,16 @@ class _HttpServer
if (ref) {
return r;
}
+ try {
+ r['socket'] = _serverSocket._toJSON(true);
+ } catch (_) {
+ r['socket'] = {
+ 'id': _servicePath,
+ 'type': '@Socket',
+ 'name': 'UserSocket',
+ 'user_name': 'UserSocket',
+ };
+ }
r['port'] = port;
r['address'] = address.host;
r['active'] = _activeConnections.length;
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/service_view.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698