#include <WIN32_Asynch_IO.h>
Inheritance diagram for ACE_WIN32_Asynch_Read_File_Result:
Public Member Functions | |
size_t | bytes_transferred (void) const |
Number of bytes transferred by the operation. | |
const void * | act (void) const |
ACT associated with the operation. | |
int | success (void) const |
Did the operation succeed? | |
const void * | completion_key (void) const |
u_long | error (void) const |
Error value if the operation fail. | |
ACE_HANDLE | event (void) const |
Event associated with the OVERLAPPED structure. | |
u_long | offset (void) const |
This really make sense only when doing file I/O. | |
u_long | offset_high (void) const |
Offset_high associated with the OVERLAPPED structure. | |
int | priority (void) const |
int | signal_number (void) const |
No-op. Returns 0. | |
size_t | bytes_to_read (void) const |
ACE_Message_Block & | message_block (void) const |
Message block which contains the read data. | |
ACE_HANDLE | handle (void) const |
I/O handle used for reading. | |
int | post_completion (ACE_Proactor_Impl *proactor) |
Post to the Proactor's completion port. | |
Protected Member Functions | |
ACE_WIN32_Asynch_Read_File_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, u_long offset, u_long offset_high, ACE_HANDLE event, int priority, int signal_number=0, int scatter_enabled=0) | |
virtual void | complete (size_t bytes_transferred, int success, const void *completion_key, u_long error) |
ACE_Proactor will call this method when the read completes. | |
virtual | ~ACE_WIN32_Asynch_Read_File_Result (void) |
Destructor. | |
Friends | |
class | ACE_WIN32_Asynch_Read_File |
Factory class will have special permissions. | |
class | ACE_WIN32_Proactor |
Proactor class has special permission. |
Definition at line 563 of file WIN32_Asynch_IO.h.
|
Constructor is protected since creation is limited to ACE_Asynch_Read_File factory. Definition at line 1066 of file WIN32_Asynch_IO.cpp. References ACE_Handler::Proxy_Ptr.
01078 : ACE_Asynch_Result_Impl (), 01079 ACE_Asynch_Read_Stream_Result_Impl (), 01080 ACE_Asynch_Read_File_Result_Impl (), 01081 ACE_WIN32_Asynch_Read_Stream_Result (handler_proxy, 01082 handle, 01083 message_block, 01084 bytes_to_read, 01085 act, 01086 event, 01087 priority, 01088 signal_number, 01089 scatter_enabled) 01090 { 01091 this->Offset = offset; 01092 this->OffsetHigh = offset_high; 01093 } |
|
Destructor.
Definition at line 1142 of file WIN32_Asynch_IO.cpp.
01143 { 01144 } |
|
ACT associated with the operation.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1156 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act().
01157 { 01158 return ACE_WIN32_Asynch_Result::act (); 01159 } |
|
The number of bytes which were requested at the start of the asynchronous read. Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1215 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Read_Stream_Result::bytes_to_read().
01216 { 01217 return ACE_WIN32_Asynch_Read_Stream_Result::bytes_to_read (); 01218 } |
|
Number of bytes transferred by the operation.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1150 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred().
01151 { 01152 return ACE_WIN32_Asynch_Result::bytes_transferred (); 01153 } |
|
ACE_Proactor will call this method when the read completes.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1096 of file WIN32_Asynch_IO.cpp. References ACE_Message_Block::cont(), ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_OS::getpagesize(), ACE_Handler::handle_read_file(), ACE_WIN32_Asynch_Read_Stream_Result::scatter_enabled(), and ACE_Message_Block::wr_ptr().
01100 { 01101 // Copy the data which was returned by GetQueuedCompletionStatus. 01102 this->bytes_transferred_ = bytes_transferred; 01103 this->success_ = success; 01104 this->completion_key_ = completion_key; 01105 this->error_ = error; 01106 01107 // Appropriately move the pointers in the message block. 01108 if (!this->scatter_enabled ()) 01109 this->message_block_.wr_ptr (bytes_transferred); 01110 else 01111 { 01112 static const size_t page_size = ACE_OS::getpagesize(); 01113 01114 for (ACE_Message_Block* mb = &this->message_block_; 01115 (mb != 0) && (bytes_transferred > 0); 01116 mb = mb->cont ()) 01117 { 01118 // mb->space () is ought to be >= page_size. 01119 // this is verified in the readv method 01120 // ACE_ASSERT (mb->space () >= page_size); 01121 01122 size_t len_part = page_size ; 01123 01124 if ( len_part > bytes_transferred) 01125 len_part = bytes_transferred; 01126 01127 mb->wr_ptr (len_part); 01128 01129 bytes_transferred -= len_part; 01130 } 01131 } 01132 01133 // Create the interface result class. 01134 ACE_Asynch_Read_File::Result result (this); 01135 01136 // Call the application handler. 01137 ACE_Handler *handler = this->handler_proxy_.get ()->handler (); 01138 if (handler != 0) 01139 handler->handle_read_file (result); 01140 } |
|
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. Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1168 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key().
01169 { 01170 return ACE_WIN32_Asynch_Result::completion_key (); 01171 } |
|
Error value if the operation fail.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1174 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error().
01175 { 01176 return ACE_WIN32_Asynch_Result::error (); 01177 } |
|
Event associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1180 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event().
01181 { 01182 return ACE_WIN32_Asynch_Result::event (); 01183 } |
|
I/O handle used for reading.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1227 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Read_Stream_Result::handle(). Referenced by ACE_WIN32_Asynch_Read_File::readv().
01228 { 01229 return ACE_WIN32_Asynch_Read_Stream_Result::handle (); 01230 } |
|
Message block which contains the read data.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1221 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Read_Stream_Result::message_block().
01222 { 01223 return ACE_WIN32_Asynch_Read_Stream_Result::message_block (); 01224 } |
|
This really make sense only when doing file I/O.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1186 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset().
01187 { 01188 return ACE_WIN32_Asynch_Result::offset (); 01189 } |
|
Offset_high associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1192 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high().
01193 { 01194 return ACE_WIN32_Asynch_Result::offset_high (); 01195 } |
|
Post to the Proactor's completion port.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1233 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion().
01234 { 01235 return ACE_WIN32_Asynch_Result::post_completion (proactor); 01236 } |
|
The priority of the asynchronous operation. Currently, this is not supported on Win32. Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1198 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority().
01199 { 01200 return ACE_WIN32_Asynch_Result::priority (); 01201 } |
|
No-op. Returns 0.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1204 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number().
01205 { 01206 return ACE_WIN32_Asynch_Result::signal_number (); 01207 } |
|
Did the operation succeed?
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 1162 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success().
01163 { 01164 return ACE_WIN32_Asynch_Result::success (); 01165 } |
|
Factory class will have special permissions.
Definition at line 567 of file WIN32_Asynch_IO.h. |
|
Proactor class has special permission.
Reimplemented from ACE_WIN32_Asynch_Read_Stream_Result. Definition at line 570 of file WIN32_Asynch_IO.h. |