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

Side by Side Diff: runtime/bin/eventhandler_win.h

Issue 8574002: Handle stdin/stdout/stderr on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef BIN_EVENTHANDLER_WIN_H_ 5 #ifndef BIN_EVENTHANDLER_WIN_H_
6 #define BIN_EVENTHANDLER_WIN_H_ 6 #define BIN_EVENTHANDLER_WIN_H_
7 7
8 #include <winsock2.h> 8 #include <winsock2.h>
9 #include <mswsock.h> 9 #include <mswsock.h>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 port_ = port; 178 port_ = port;
179 mask_ = mask; 179 mask_ = mask;
180 } 180 }
181 Type type() { return type_; } 181 Type type() { return type_; }
182 bool is_file() { return type_ == kFile; } 182 bool is_file() { return type_ == kFile; }
183 bool is_socket() { return type_ == kListenSocket || type_ == kClientSocket; } 183 bool is_socket() { return type_ == kListenSocket || type_ == kClientSocket; }
184 bool is_listen_socket() { return type_ == kListenSocket; } 184 bool is_listen_socket() { return type_ == kListenSocket; }
185 bool is_client_socket() { return type_ == kClientSocket; } 185 bool is_client_socket() { return type_ == kClientSocket; }
186 intptr_t mask() { return mask_; } 186 intptr_t mask() { return mask_; }
187 187
188 void MarkDontSupportOverlappedIO() {
Mads Ager (google) 2011/11/15 12:45:20 Dont -> DoesNot?
Søren Gjesse 2011/11/15 13:16:05 Done.
189 flags_ |= (1 << kDontSupportOverlappedIO);
190 }
191 bool SupportsOverlappedIO() {
192 return (flags_ & (1 << kDontSupportOverlappedIO)) == 0;
193 }
194
195 void ReadSyncCompleteAsync();
196
188 protected: 197 protected:
189 enum Flags { 198 enum Flags {
190 kClosing = 0, 199 kClosing = 0,
191 kCloseRead = 1, 200 kCloseRead = 1,
192 kCloseWrite = 2 201 kCloseWrite = 2,
202 kDontSupportOverlappedIO = 3
193 }; 203 };
194 204
195 explicit Handle(HANDLE handle); 205 explicit Handle(HANDLE handle);
196 Handle(HANDLE handle, Dart_Port port); 206 Handle(HANDLE handle, Dart_Port port);
197 207
198 virtual void AfterClose() = 0; 208 virtual void AfterClose() = 0;
199 209
200 Type type_; 210 Type type_;
201 HANDLE handle_; 211 HANDLE handle_;
202 Dart_Port port_; // Dart port to communicate events for this socket. 212 Dart_Port port_; // Dart port to communicate events for this socket.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 private: 355 private:
346 ClientSocket* client_sockets_head_; 356 ClientSocket* client_sockets_head_;
347 357
348 int64_t timeout_; // Time for next timeout. 358 int64_t timeout_; // Time for next timeout.
349 Dart_Port timeout_port_; 359 Dart_Port timeout_port_;
350 HANDLE completion_port_; 360 HANDLE completion_port_;
351 }; 361 };
352 362
353 363
354 #endif // BIN_EVENTHANDLER_WIN_H_ 364 #endif // BIN_EVENTHANDLER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698