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

Unified Diff: runtime/bin/socket_linux.cc

Issue 2205913003: Better error-message when bind fails. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add android support. Created 4 years, 4 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_fuchsia.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_linux.cc
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index 63935676fab39bc2d4db57a7c24a6b76d21566b7..fc0f1e413c3898c0c15294a4532606328dc17257 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -101,6 +101,12 @@ intptr_t Socket::CreateBindConnect(const RawAddr& addr,
}
+bool Socket::IsBindError(intptr_t error_number) {
+ return error_number == EADDRINUSE || error_number == EADDRNOTAVAIL ||
+ error_number == EINVAL;
+}
+
+
intptr_t Socket::Available(intptr_t fd) {
return FDUtils::AvailableBytes(fd);
}
« no previous file with comments | « runtime/bin/socket_fuchsia.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698