| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 void SendData(intptr_t id, Dart_Port dart_port, int64_t data); | 504 void SendData(intptr_t id, Dart_Port dart_port, int64_t data); |
| 505 void Start(EventHandler* handler); | 505 void Start(EventHandler* handler); |
| 506 void Shutdown(); | 506 void Shutdown(); |
| 507 | 507 |
| 508 static void EventHandlerEntry(uword args); | 508 static void EventHandlerEntry(uword args); |
| 509 | 509 |
| 510 int64_t GetTimeout(); | 510 int64_t GetTimeout(); |
| 511 void HandleInterrupt(InterruptMessage* msg); | 511 void HandleInterrupt(InterruptMessage* msg); |
| 512 void HandleTimeout(); | 512 void HandleTimeout(); |
| 513 void HandleAccept(ListenSocket* listen_socket, OverlappedBuffer* buffer); | 513 void HandleAccept(ListenSocket* listen_socket, OverlappedBuffer* buffer); |
| 514 void HandleClosed(Handle* handle); | |
| 515 void HandleError(Handle* handle); | |
| 516 void HandleRead(Handle* handle, int bytes, OverlappedBuffer* buffer); | 514 void HandleRead(Handle* handle, int bytes, OverlappedBuffer* buffer); |
| 517 void HandleRecvFrom(Handle* handle, int bytes, OverlappedBuffer* buffer); | 515 void HandleRecvFrom(Handle* handle, int bytes, OverlappedBuffer* buffer); |
| 518 void HandleWrite(Handle* handle, int bytes, OverlappedBuffer* buffer); | 516 void HandleWrite(Handle* handle, int bytes, OverlappedBuffer* buffer); |
| 519 void HandleDisconnect(ClientSocket* client_socket, | 517 void HandleDisconnect(ClientSocket* client_socket, |
| 520 int bytes, | 518 int bytes, |
| 521 OverlappedBuffer* buffer); | 519 OverlappedBuffer* buffer); |
| 522 void HandleConnect(ClientSocket* client_socket, | 520 void HandleConnect(ClientSocket* client_socket, |
| 523 int bytes, | 521 int bytes, |
| 524 OverlappedBuffer* buffer); | 522 OverlappedBuffer* buffer); |
| 525 void HandleIOCompletion(DWORD bytes, ULONG_PTR key, OVERLAPPED* overlapped); | 523 void HandleIOCompletion(DWORD bytes, ULONG_PTR key, OVERLAPPED* overlapped); |
| 526 | 524 |
| 527 HANDLE completion_port() { return completion_port_; } | 525 HANDLE completion_port() { return completion_port_; } |
| 528 | 526 |
| 529 private: | 527 private: |
| 530 ClientSocket* client_sockets_head_; | 528 ClientSocket* client_sockets_head_; |
| 531 | 529 |
| 532 TimeoutQueue timeout_queue_; // Time for next timeout. | 530 TimeoutQueue timeout_queue_; // Time for next timeout. |
| 533 bool shutdown_; | 531 bool shutdown_; |
| 534 HANDLE completion_port_; | 532 HANDLE completion_port_; |
| 535 }; | 533 }; |
| 536 | 534 |
| 537 } // namespace bin | 535 } // namespace bin |
| 538 } // namespace dart | 536 } // namespace dart |
| 539 | 537 |
| 540 #endif // BIN_EVENTHANDLER_WIN_H_ | 538 #endif // BIN_EVENTHANDLER_WIN_H_ |
| OLD | NEW |