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 3db42e582085c2b3d0f7ac528576a9fd93cafbc5..fe7d85dd5654ac945acc0ce03301d0d8764b81ca 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/server.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/server.dart |
@@ -29,6 +29,11 @@ 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 results of requests handled by the server. |
/// |
/// These can be used to provide visual feedback for the server's processing. |
@@ -45,10 +50,10 @@ 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)); |
+ .then((server) => new BarbackServer._(server, barback, rootPackage, host)); |
nweiz
2013/09/25 19:15:27
Long line.
|
} |
- BarbackServer._(HttpServer server, this.barback, this._rootPackage) |
+ BarbackServer._(HttpServer server, this.barback, this._rootPackage, this.host) |
: _server = server, |
port = server.port { |
_server.listen(_handleRequest, onError: (error) { |