OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #if !defined(BIN_EVENTHANDLER_H_) | 8 #if !defined(BIN_EVENTHANDLER_H_) |
9 #error Do not include eventhandler_win.h directly; use eventhandler.h instead. | 9 #error Do not include eventhandler_win.h directly; use eventhandler.h instead. |
10 #endif | 10 #endif |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 | 353 |
354 LPFN_DISCONNECTEX DisconnectEx_; | 354 LPFN_DISCONNECTEX DisconnectEx_; |
355 ClientSocket* next_; | 355 ClientSocket* next_; |
356 }; | 356 }; |
357 | 357 |
358 | 358 |
359 // Event handler. | 359 // Event handler. |
360 class EventHandlerImplementation { | 360 class EventHandlerImplementation { |
361 public: | 361 public: |
362 EventHandlerImplementation(); | 362 EventHandlerImplementation(); |
363 virtual ~EventHandlerImplementation() {} | 363 virtual ~EventHandlerImplementation(); |
364 | 364 |
365 void SendData(intptr_t id, Dart_Port dart_port, int64_t data); | 365 void SendData(intptr_t id, Dart_Port dart_port, int64_t data); |
366 void Start(); | 366 void Start(EventHandler* handler); |
367 void Shutdown(); | 367 void Shutdown(); |
368 | 368 |
369 static void EventHandlerEntry(uword args); | 369 static void EventHandlerEntry(uword args); |
370 | 370 |
371 DWORD GetTimeout(); | 371 DWORD GetTimeout(); |
372 void HandleInterrupt(InterruptMessage* msg); | 372 void HandleInterrupt(InterruptMessage* msg); |
373 void HandleTimeout(); | 373 void HandleTimeout(); |
374 void HandleAccept(ListenSocket* listen_socket, IOBuffer* buffer); | 374 void HandleAccept(ListenSocket* listen_socket, IOBuffer* buffer); |
375 void HandleClosed(Handle* handle); | 375 void HandleClosed(Handle* handle); |
376 void HandleError(Handle* handle); | 376 void HandleError(Handle* handle); |
(...skipping 10 matching lines...) Expand all Loading... |
387 ClientSocket* client_sockets_head_; | 387 ClientSocket* client_sockets_head_; |
388 | 388 |
389 int64_t timeout_; // Time for next timeout. | 389 int64_t timeout_; // Time for next timeout. |
390 Dart_Port timeout_port_; | 390 Dart_Port timeout_port_; |
391 bool shutdown_; | 391 bool shutdown_; |
392 HANDLE completion_port_; | 392 HANDLE completion_port_; |
393 }; | 393 }; |
394 | 394 |
395 | 395 |
396 #endif // BIN_EVENTHANDLER_WIN_H_ | 396 #endif // BIN_EVENTHANDLER_WIN_H_ |
OLD | NEW |