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

Unified Diff: runtime/bin/vmstats_impl.cc

Issue 14469002: Add new InternetAddress class with a static lookup function (including IPv6 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/socket_win.cc ('k') | sdk/lib/_internal/compiler/implementation/lib/io_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmstats_impl.cc
diff --git a/runtime/bin/vmstats_impl.cc b/runtime/bin/vmstats_impl.cc
index d2e0af679d2f5933c7fc81d960170ce9b0e20c4c..0468a5144ba67ce50af785918de72f4343fb2a61 100644
--- a/runtime/bin/vmstats_impl.cc
+++ b/runtime/bin/vmstats_impl.cc
@@ -55,15 +55,15 @@ void VmStats::StartServer(int port, const char* root_dir) {
// TODO(tball): allow host to be specified.
char* host = const_cast<char*>(DEFAULT_HOST);
OSError* os_error;
- const char* host_ip = Socket::LookupIPv4Address(host, &os_error);
- if (host_ip == NULL) {
+ SocketAddresses* addresses = Socket::LookupAddress(host, -1, &os_error);
+ if (addresses == NULL) {
Log::PrintErr("Failed IP lookup of VmStats host %s: %s\n",
host, os_error->message());
return;
}
-
const intptr_t BACKLOG = 128; // Default value from HttpServer.dart
- int64_t address = ServerSocket::CreateBindListen(host_ip, port, BACKLOG);
+ int64_t address = ServerSocket::CreateBindListen(
+ addresses->GetAt(0)->addr(), port, BACKLOG);
if (address < 0) {
Log::PrintErr("Failed binding VmStats socket: %s:%d\n", host, port);
return;
« no previous file with comments | « runtime/bin/socket_win.cc ('k') | sdk/lib/_internal/compiler/implementation/lib/io_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698