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

Unified Diff: runtime/bin/eventhandler_win.cc

Issue 313083004: Don't use same value for socket() and handle(), as they are different concepts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/eventhandler_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 934c7ca96cdf1cff572e2455e7e8bdcbf0e93f8d..26260a404eff73099b259a0521696b921eeebd62 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -432,6 +432,18 @@ void DirectoryWatchHandle::Stop() {
}
+bool SocketHandle::CreateCompletionPort(HANDLE completion_port) {
+ completion_port_ = CreateIoCompletionPort(reinterpret_cast<HANDLE>(socket()),
kasperl 2014/06/04 14:01:05 Would it make sense to have a non-virtual DoCreate
Anders Johnsen 2014/06/04 14:05:22 Done.
+ completion_port,
+ reinterpret_cast<ULONG_PTR>(this),
+ 0);
+ if (completion_port_ == NULL) {
+ return false;
+ }
+ return true;
+}
+
+
void SocketHandle::HandleIssueError() {
int error = WSAGetLastError();
if (error == WSAECONNRESET) {
« no previous file with comments | « runtime/bin/eventhandler_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698