#include <WIN32_Asynch_IO.h>
Inheritance diagram for ACE_WIN32_Asynch_Result:


Public Methods | |
| size_t | bytes_transferred (void) const |
| Number of bytes transferred by the operation. More... | |
| const void * | act (void) const |
| ACT associated with the operation. More... | |
| int | success (void) const |
| Did the operation succeed? More... | |
| const void * | completion_key (void) const |
| u_long | error (void) const |
| Error value if the operation fail. More... | |
| ACE_HANDLE | event (void) const |
| Event associated with the OVERLAPPED structure. More... | |
| u_long | offset (void) const |
| This really make sense only when doing file I/O. More... | |
| u_long | offset_high (void) const |
| Offset_high associated with the OVERLAPPED structure. More... | |
| int | priority (void) const |
| The priority of the asynchronous operation. Currently, this is not supported on Win32. More... | |
| int | signal_number (void) const |
| Returns 0. More... | |
| int | post_completion (ACE_Proactor_Impl *proactor) |
| Post <this> to the Proactor's completion port. More... | |
| virtual | ~ACE_WIN32_Asynch_Result (void) |
| Destructor. More... | |
| void | set_error (u_long errcode) |
| Simulate error value to use in the post_completion (). More... | |
| void | set_bytes_transferred (size_t nbytes) |
| Simulate value to use in the post_completion (). More... | |
Protected Methods | |
| ACE_WIN32_Asynch_Result (ACE_Handler &handler, const void *act, ACE_HANDLE event, u_long offset, u_long offset_high, int priority, int signal_number=0) | |
| Constructor. More... | |
Protected Attributes | |
| ACE_Handler & | handler_ |
| Handler that will be called back. More... | |
| const void * | act_ |
| ACT for this operation. More... | |
| size_t | bytes_transferred_ |
| Bytes transferred by this operation. More... | |
| int | success_ |
| Success indicator. More... | |
| const void * | completion_key_ |
| ACT associated with handle. More... | |
| u_long | error_ |
| Error if operation failed. More... | |
Friends | |
| class | ACE_WIN32_Asynch_Accept |
| Factory class has special permissions. More... | |
| class | ACE_WIN32_Proactor |
| Proactor class has special permission. More... | |
An abstract base class from which you can obtain some basic information like the number of bytes transferred, the ACT associated with the asynchronous operation, indication of success or failure, etc. Subclasses may want to store more information that is particular to the asynchronous operation it represents.
Definition at line 60 of file WIN32_Asynch_IO.h.
|
|
Destructor.
Definition at line 104 of file WIN32_Asynch_IO.cpp.
00105 {
00106 }
|
|
||||||||||||||||||||||||||||||||
|
Constructor.
Definition at line 108 of file WIN32_Asynch_IO.cpp. References event, offset, offset_high, priority, and signal_number.
00115 : ACE_Asynch_Result_Impl (), 00116 OVERLAPPED (), 00117 handler_ (handler), 00118 act_ (act), 00119 bytes_transferred_ (0), 00120 success_ (0), 00121 completion_key_ (0), 00122 error_ (0) 00123 { 00124 // Set the ACE_OVERLAPPED structure 00125 this->Internal = 0; 00126 this->InternalHigh = 0; 00127 this->Offset = offset; 00128 this->OffsetHigh = offset_high; 00129 this->hEvent = event; 00130 00131 ACE_UNUSED_ARG (priority); 00132 ACE_UNUSED_ARG (signal_number); 00133 } |
|
|
ACT associated with the operation.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 23 of file WIN32_Asynch_IO.cpp. References act_. Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::act, ACE_WIN32_Asynch_Read_Dgram_Result::act, ACE_WIN32_Asynch_Transmit_File_Result::act, ACE_WIN32_Asynch_Connect_Result::act, ACE_WIN32_Asynch_Accept_Result::act, ACE_WIN32_Asynch_Write_File_Result::act, ACE_WIN32_Asynch_Read_File_Result::act, ACE_WIN32_Asynch_Write_Stream_Result::act, and ACE_WIN32_Asynch_Read_Stream_Result::act.
00024 {
00025 return this->act_;
00026 }
|
|
|
Number of bytes transferred by the operation.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 17 of file WIN32_Asynch_IO.cpp. References bytes_transferred_. Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::bytes_transferred, ACE_WIN32_Asynch_Read_Dgram_Result::bytes_transferred, ACE_WIN32_Asynch_Transmit_File_Result::bytes_transferred, ACE_WIN32_Asynch_Connect_Result::bytes_transferred, ACE_WIN32_Asynch_Accept_Result::bytes_transferred, ACE_WIN32_Asynch_Write_File_Result::bytes_transferred, ACE_WIN32_Asynch_Read_File_Result::bytes_transferred, ACE_WIN32_Asynch_Write_Stream_Result::bytes_transferred, ACE_WIN32_Asynch_Read_Stream_Result::bytes_transferred, ACE_WIN32_Asynch_Timer::complete, and ACE_WIN32_Proactor::post_completion.
00018 {
00019 return this->bytes_transferred_;
00020 }
|
|
|
This returns the ACT associated with the handle when it was registered with the I/O completion port. This ACT is not the same as the ACT associated with the asynchronous operation. Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 35 of file WIN32_Asynch_IO.cpp. References completion_key_. Referenced by ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::completion_key, ACE_WIN32_Asynch_Read_Dgram_Result::completion_key, ACE_WIN32_Asynch_Transmit_File_Result::completion_key, ACE_WIN32_Asynch_Connect_Result::completion_key, ACE_WIN32_Asynch_Accept_Result::completion_key, ACE_WIN32_Asynch_Write_File_Result::completion_key, ACE_WIN32_Asynch_Read_File_Result::completion_key, ACE_WIN32_Asynch_Write_Stream_Result::completion_key, ACE_WIN32_Asynch_Read_Stream_Result::completion_key, and ACE_WIN32_Proactor::post_completion.
00036 {
00037 return this->completion_key_;
00038 }
|
|
|
Error value if the operation fail.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 41 of file WIN32_Asynch_IO.cpp. References error_. Referenced by ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::error, ACE_WIN32_Asynch_Read_Dgram_Result::error, ACE_WIN32_Asynch_Transmit_File_Result::error, ACE_WIN32_Asynch_Connect_Result::error, ACE_WIN32_Asynch_Accept_Result::error, ACE_WIN32_Asynch_Write_File_Result::error, ACE_WIN32_Asynch_Read_File_Result::error, ACE_WIN32_Asynch_Write_Stream_Result::error, ACE_WIN32_Asynch_Read_Stream_Result::error, and ACE_WIN32_Proactor::handle_events.
00042 {
00043 return this->error_;
00044 }
|
|
|
Event associated with the OVERLAPPED structure.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 47 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::event, ACE_WIN32_Asynch_Read_Dgram_Result::event, ACE_WIN32_Asynch_Transmit_File_Result::event, ACE_WIN32_Asynch_Connect_Result::event, ACE_WIN32_Asynch_Accept_Result::event, ACE_WIN32_Asynch_Write_File_Result::event, ACE_WIN32_Asynch_Read_File_Result::event, ACE_WIN32_Asynch_Write_Stream_Result::event, and ACE_WIN32_Asynch_Read_Stream_Result::event.
00048 {
00049 return this->hEvent;
00050 }
|
|
|
This really make sense only when doing file I/O.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 53 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::offset, ACE_WIN32_Asynch_Read_Dgram_Result::offset, ACE_WIN32_Asynch_Transmit_File_Result::offset, ACE_WIN32_Asynch_Connect_Result::offset, ACE_WIN32_Asynch_Accept_Result::offset, ACE_WIN32_Asynch_Write_File_Result::offset, ACE_WIN32_Asynch_Read_File_Result::offset, ACE_WIN32_Asynch_Write_Stream_Result::offset, and ACE_WIN32_Asynch_Read_Stream_Result::offset.
00054 {
00055 return this->Offset;
00056 }
|
|
|
Offset_high associated with the OVERLAPPED structure.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 59 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::offset_high, ACE_WIN32_Asynch_Read_Dgram_Result::offset_high, ACE_WIN32_Asynch_Transmit_File_Result::offset_high, ACE_WIN32_Asynch_Connect_Result::offset_high, ACE_WIN32_Asynch_Accept_Result::offset_high, ACE_WIN32_Asynch_Write_File_Result::offset_high, ACE_WIN32_Asynch_Read_File_Result::offset_high, ACE_WIN32_Asynch_Write_Stream_Result::offset_high, and ACE_WIN32_Asynch_Read_Stream_Result::offset_high.
00060 {
00061 return this->OffsetHigh;
00062 }
|
|
|
|
The priority of the asynchronous operation. Currently, this is not supported on Win32.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 65 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::priority, ACE_WIN32_Asynch_Read_Dgram_Result::priority, ACE_WIN32_Asynch_Transmit_File_Result::priority, ACE_WIN32_Asynch_Connect_Result::priority, ACE_WIN32_Asynch_Accept_Result::priority, ACE_WIN32_Asynch_Write_File_Result::priority, ACE_WIN32_Asynch_Read_File_Result::priority, ACE_WIN32_Asynch_Write_Stream_Result::priority, and ACE_WIN32_Asynch_Read_Stream_Result::priority.
00066 {
00067 ACE_NOTSUP_RETURN (0);
00068 }
|
|
|
Simulate value to use in the post_completion ().
Definition at line 93 of file WIN32_Asynch_IO.cpp. References bytes_transferred_. Referenced by ACE_WIN32_Asynch_Connect::cancel_uncompleted, ACE_WIN32_Asynch_Connect::connect_i, ACE_WIN32_Asynch_Connect::handle_close, and ACE_WIN32_Asynch_Connect::handle_output.
00094 {
00095 this->bytes_transferred_ = nbytes;
00096 }
|
|
|
Simulate error value to use in the post_completion ().
Definition at line 99 of file WIN32_Asynch_IO.cpp. References error_. Referenced by ACE_WIN32_Asynch_Connect::cancel_uncompleted, ACE_WIN32_Asynch_Connect::connect, ACE_WIN32_Asynch_Connect::connect_i, ACE_WIN32_Asynch_Connect::handle_close, ACE_WIN32_Asynch_Connect::handle_output, ACE_WIN32_Asynch_Read_File::readv, ACE_WIN32_Asynch_Read_Stream::readv, ACE_WIN32_Asynch_Read_Stream::shared_read, ACE_WIN32_Asynch_Write_Stream::shared_write, and ACE_WIN32_Asynch_Write_File::writev.
00100 {
00101 this->error_ = errcode;
00102 }
|
|
|
Returns 0.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 71 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::signal_number, ACE_WIN32_Asynch_Read_Dgram_Result::signal_number, ACE_WIN32_Asynch_Transmit_File_Result::signal_number, ACE_WIN32_Asynch_Connect_Result::signal_number, ACE_WIN32_Asynch_Accept_Result::signal_number, ACE_WIN32_Asynch_Write_File_Result::signal_number, ACE_WIN32_Asynch_Read_File_Result::signal_number, ACE_WIN32_Asynch_Write_Stream_Result::signal_number, and ACE_WIN32_Asynch_Read_Stream_Result::signal_number.
00072 {
00073 ACE_NOTSUP_RETURN (0);
00074 }
|
|
|
Did the operation succeed?
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 29 of file WIN32_Asynch_IO.cpp. References success_. Referenced by ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::success, ACE_WIN32_Asynch_Read_Dgram_Result::success, ACE_WIN32_Asynch_Transmit_File_Result::success, ACE_WIN32_Asynch_Connect_Result::success, ACE_WIN32_Asynch_Accept_Result::success, ACE_WIN32_Asynch_Write_File_Result::success, ACE_WIN32_Asynch_Read_File_Result::success, ACE_WIN32_Asynch_Write_Stream_Result::success, and ACE_WIN32_Asynch_Read_Stream_Result::success.
00030 {
00031 return this->success_;
00032 }
|
|
|
Factory class has special permissions.
Reimplemented in ACE_WIN32_Asynch_Accept_Result. Definition at line 64 of file WIN32_Asynch_IO.h. |
|
|
Proactor class has special permission.
Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 67 of file WIN32_Asynch_IO.h. |
|
|
ACT for this operation.
Definition at line 131 of file WIN32_Asynch_IO.h. Referenced by act. |
|
|
|
|
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002