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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/server.dart

Issue 25010004: Add .address to [Raw]ServerSocket and HttpServer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove 'host' arg from BarbackServer constructor. Created 7 years, 3 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 | « sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart ('k') | sdk/lib/io/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/server.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/server.dart b/sdk/lib/_internal/pub/lib/src/barback/server.dart
index a2ce379e49637edcea89dbc4d40e3e8d05e5096f..3b8c1542cf4c6d2a9f43d02921f5a67a7e8786ec 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/server.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/server.dart
@@ -29,10 +29,8 @@ class BarbackServer {
/// The server's port.
final int port;
- /// The server's hostname.
- final String host;
- // TODO(whesse): replace this with the InternetAddress of the HttpServer, when
- // that is exposed.
+ /// The server's address.
+ final InternetAddress address;
/// The results of requests handled by the server.
///
@@ -50,12 +48,13 @@ class BarbackServer {
static Future<BarbackServer> bind(String host, int port, Barback barback,
String rootPackage) {
return HttpServer.bind(host, port)
- .then((server) => new BarbackServer._(server, barback, rootPackage, host));
+ .then((server) => new BarbackServer._(server, barback, rootPackage));
}
- BarbackServer._(HttpServer server, this.barback, this._rootPackage, this.host)
+ BarbackServer._(HttpServer server, this.barback, this._rootPackage)
: _server = server,
- port = server.port {
+ port = server.port,
+ address = server.address {
_server.listen(_handleRequest, onError: (error) {
_resultsController.addError(error);
close();
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart ('k') | sdk/lib/io/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698