| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "bin/eventhandler.h" | 8 #include "bin/eventhandler.h" |
| 9 #include "bin/eventhandler_win.h" | 9 #include "bin/eventhandler_win.h" |
| 10 | 10 |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 closed_ = true; | 878 closed_ = true; |
| 879 } | 879 } |
| 880 | 880 |
| 881 | 881 |
| 882 void ClientSocket::ConnectComplete(OverlappedBuffer* buffer) { | 882 void ClientSocket::ConnectComplete(OverlappedBuffer* buffer) { |
| 883 OverlappedBuffer::DisposeBuffer(buffer); | 883 OverlappedBuffer::DisposeBuffer(buffer); |
| 884 // Update socket to support full socket API, after ConnectEx completed. | 884 // Update socket to support full socket API, after ConnectEx completed. |
| 885 setsockopt(socket(), SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0); | 885 setsockopt(socket(), SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0); |
| 886 // If the port is set, we already listen for this socket in Dart. | 886 // If the port is set, we already listen for this socket in Dart. |
| 887 // Handle the cases here. | 887 // Handle the cases here. |
| 888 if (!IsClosedRead() && (Mask() & (1 << kInEvent) != 0)) { | 888 if (!IsClosedRead() && ((Mask() & (1 << kInEvent)) != 0)) { |
| 889 IssueRead(); | 889 IssueRead(); |
| 890 } | 890 } |
| 891 if (!IsClosedWrite() && (Mask() & (1 << kOutEvent) != 0)) { | 891 if (!IsClosedWrite() && ((Mask() & (1 << kOutEvent)) != 0)) { |
| 892 Dart_Port port = NextNotifyDartPort(1 << kOutEvent); | 892 Dart_Port port = NextNotifyDartPort(1 << kOutEvent); |
| 893 DartUtils::PostInt32(port, 1 << kOutEvent); | 893 DartUtils::PostInt32(port, 1 << kOutEvent); |
| 894 } | 894 } |
| 895 } | 895 } |
| 896 | 896 |
| 897 | 897 |
| 898 void ClientSocket::EnsureInitialized( | 898 void ClientSocket::EnsureInitialized( |
| 899 EventHandlerImplementation* event_handler) { | 899 EventHandlerImplementation* event_handler) { |
| 900 ScopedLock lock(this); | 900 ScopedLock lock(this); |
| 901 if (completion_port_ == INVALID_HANDLE_VALUE) { | 901 if (completion_port_ == INVALID_HANDLE_VALUE) { |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1380 | 1380 |
| 1381 | 1381 |
| 1382 void EventHandlerImplementation::Shutdown() { | 1382 void EventHandlerImplementation::Shutdown() { |
| 1383 SendData(kShutdownId, 0, 0); | 1383 SendData(kShutdownId, 0, 0); |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 } // namespace bin | 1386 } // namespace bin |
| 1387 } // namespace dart | 1387 } // namespace dart |
| 1388 | 1388 |
| 1389 #endif // defined(TARGET_OS_WINDOWS) | 1389 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |