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

Unified Diff: runtime/bin/socket_win.cc

Issue 2205913003: Better error-message when bind fails. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update Changelog. 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
Index: runtime/bin/socket_win.cc
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index e3d366da53bf8a83501d60f6d9b31b06e6748421..f76f764c7c4835789c8fda0024d216c3b34778b7 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -250,6 +250,12 @@ intptr_t Socket::CreateBindConnect(const RawAddr& addr,
}
+bool Socket::IsBindError(intptr_t error_number) {
+ return error_number == WSAEADDRINUSE || error_number == WSAEADDRNOTAVAIL ||
+ error_number == WSAEINVAL;
+}
+
+
void Socket::GetError(intptr_t fd, OSError* os_error) {
Handle* handle = reinterpret_cast<Handle*>(fd);
os_error->SetCodeAndMessage(OSError::kSystem, handle->last_error());

Powered by Google App Engine
This is Rietveld 408576698