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

Unified Diff: runtime/bin/socket_win.cc

Issue 907883002: Remove SetNonBlocking/SetBlocking methods from Socket and add missing close-on-exec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 5 years, 10 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_macos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_win.cc
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index 346c7b120d47d33209b379761538f92d96231cdb..05b2d865a7f6b6ce3f7fdae20d2b14a144cf1032 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -550,27 +550,6 @@ void Socket::Close(intptr_t fd) {
}
-static bool SetBlockingHelper(intptr_t fd, bool blocking) {
- SocketHandle* handle = reinterpret_cast<SocketHandle*>(fd);
- u_long iMode = blocking ? 0 : 1;
- int status = ioctlsocket(handle->socket(), FIONBIO, &iMode);
- if (status != NO_ERROR) {
- return false;
- }
- return true;
-}
-
-
-bool Socket::SetNonBlocking(intptr_t fd) {
- return SetBlockingHelper(fd, false);
-}
-
-
-bool Socket::SetBlocking(intptr_t fd) {
- return SetBlockingHelper(fd, true);
-}
-
-
bool Socket::GetNoDelay(intptr_t fd, bool* enabled) {
SocketHandle* handle = reinterpret_cast<SocketHandle*>(fd);
int on;
« no previous file with comments | « runtime/bin/socket_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698