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

Unified Diff: runtime/bin/vmservice/server.dart

Issue 2438613002: Provide an API to dart:developer to control the web server hosting the Service Protocol (Closed)
Patch Set: self review Created 4 years, 2 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/vmservice_io.dart » ('j') | sdk/lib/developer/service.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/server.dart
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index 32ee7d6d24c0c06009b9d6e165b120765d6d477e..0f9f8ce6ea4e3a7306607da8a981b5824c68b424 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -128,6 +128,15 @@ class Server {
bool get running => _server != null;
bool _displayMessages = false;
+ Uri get serverAddress {
+ if (!running) {
+ return null;
+ }
+ var ip = _server.address.address;
+ var port = _server.port;
+ return Uri.parse('http://$ip:$port/');
+ }
+
Server(this._service, this._ip, this._port, this._originCheckDisabled) {
_displayMessages = (_ip != '127.0.0.1' || _port != 8181);
}
« no previous file with comments | « no previous file | runtime/bin/vmservice/vmservice_io.dart » ('j') | sdk/lib/developer/service.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698