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


Public Methods | |
| size_t | bytes_to_read (void) const |
| The number of bytes which were requested at the start of the asynchronous read. More... | |
| ACE_Message_Block & | message_block (void) const |
| Message block which contains the read data. More... | |
| ACE_HANDLE | handle (void) const |
| I/O handle used for reading. More... | |
| 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 |
| No-op. Returns 0. More... | |
| int | post_completion (ACE_Proactor_Impl *proactor) |
| Post <this> to the Proactor's completion port. More... | |
| int | scatter_enabled (void) const |
| Accessor for the scatter read flag. More... | |
Protected Methods | |
| ACE_WIN32_Asynch_Read_Stream_Result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event, int priority, int signal_number=0, int scatter_enabled=0) | |
| Constructor is protected since creation is limited to ACE_Asynch_Read_Stream factory. More... | |
| virtual void | complete (size_t bytes_transferred, int success, const void *completion_key, u_long error) |
| Proactor will call this method when the read completes. More... | |
| virtual | ~ACE_WIN32_Asynch_Read_Stream_Result (void) |
| Destructor. More... | |
Protected Attributes | |
| size_t | bytes_to_read_ |
| Bytes requested when the asynchronous read was initiated. More... | |
| ACE_Message_Block & | message_block_ |
| Message block for reading the data into. More... | |
| ACE_HANDLE | handle_ |
| I/O handle used for reading. More... | |
| int | scatter_enabled_ |
| Flag for scatter read. More... | |
Friends | |
| class | ACE_WIN32_Asynch_Read_Stream |
| Factory class will have special permissions. More... | |
| class | ACE_WIN32_Proactor |
| Proactor class has special permission. More... | |
Definition at line 205 of file WIN32_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||
|
Constructor is protected since creation is limited to ACE_Asynch_Read_Stream factory.
Definition at line 222 of file WIN32_Asynch_IO.cpp.
00231 : ACE_Asynch_Result_Impl (), 00232 ACE_Asynch_Read_Stream_Result_Impl (), 00233 ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number), 00234 bytes_to_read_ (bytes_to_read), 00235 message_block_ (message_block), 00236 handle_ (handle), 00237 scatter_enabled_ (scatter_enabled) 00238 { 00239 } |
|
|
Destructor.
Definition at line 280 of file WIN32_Asynch_IO.cpp.
00281 {
00282 }
|
|
|
ACT associated with the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 294 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act.
00295 {
00296 return ACE_WIN32_Asynch_Result::act ();
00297 }
|
|
|
The number of bytes which were requested at the start of the asynchronous read.
Implements ACE_Asynch_Read_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 205 of file WIN32_Asynch_IO.cpp. References bytes_to_read_. Referenced by ACE_WIN32_Asynch_Read_File_Result::bytes_to_read, and ACE_WIN32_Asynch_Read_Stream::shared_read.
00206 {
00207 return this->bytes_to_read_;
00208 }
|
|
|
Number of bytes transferred by the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 288 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred. Referenced by complete.
00289 {
00290 return ACE_WIN32_Asynch_Result::bytes_transferred ();
00291 }
|
|
||||||||||||||||||||
|
Proactor will call this method when the read completes.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 242 of file WIN32_Asynch_IO.cpp. References bytes_transferred, ACE_WIN32_Asynch_Result::bytes_transferred_, completion_key, ACE_WIN32_Asynch_Result::completion_key_, ACE_Message_Block::cont, error, ACE_WIN32_Asynch_Result::error_, ACE_Handler::handle_read_stream, ACE_WIN32_Asynch_Result::handler_, message_block_, scatter_enabled, ACE_Message_Block::space, success, ACE_WIN32_Asynch_Result::success_, and ACE_Message_Block::wr_ptr.
00246 {
00247 // Copy the data which was returned by GetQueuedCompletionStatus
00248 this->bytes_transferred_ = bytes_transferred;
00249 this->success_ = success;
00250 this->completion_key_ = completion_key;
00251 this->error_ = error;
00252
00253 // Appropriately move the pointers in the message block.
00254 if (!this->scatter_enabled ())
00255 this->message_block_.wr_ptr (bytes_transferred);
00256 else
00257 {
00258 for (ACE_Message_Block* mb = &this->message_block_;
00259 (mb != 0) && (bytes_transferred > 0);
00260 mb = mb->cont ())
00261 {
00262 size_t len_part = mb->space ();
00263
00264 if (len_part > bytes_transferred)
00265 len_part = bytes_transferred;
00266
00267 mb->wr_ptr (len_part);
00268
00269 bytes_transferred -= len_part;
00270 }
00271 }
00272
00273 // Create the interface result class.
00274 ACE_Asynch_Read_Stream::Result result (this);
00275
00276 // Call the application handler.
00277 this->handler_.handle_read_stream (result);
00278 }
|
|
|
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_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 306 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key. Referenced by complete.
00307 {
00308 return ACE_WIN32_Asynch_Result::completion_key ();
00309 }
|
|
|
Error value if the operation fail.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 312 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error. Referenced by complete.
00313 {
00314 return ACE_WIN32_Asynch_Result::error ();
00315 }
|
|
|
Event associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 318 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event.
00319 {
00320 return ACE_WIN32_Asynch_Result::event ();
00321 }
|
|
|
I/O handle used for reading.
Implements ACE_Asynch_Read_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 217 of file WIN32_Asynch_IO.cpp. References handle_. Referenced by ACE_WIN32_Asynch_Read_File_Result::handle, ACE_WIN32_Asynch_Read_Stream::readv, and ACE_WIN32_Asynch_Read_Stream::shared_read.
00218 {
00219 return this->handle_;
00220 }
|
|
|
Message block which contains the read data.
Implements ACE_Asynch_Read_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 211 of file WIN32_Asynch_IO.cpp. References message_block_. Referenced by ACE_WIN32_Asynch_Read_File_Result::message_block, and ACE_WIN32_Asynch_Read_Stream::shared_read.
00212 {
00213 return this->message_block_;
00214 }
|
|
|
This really make sense only when doing file I/O.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 324 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset.
00325 {
00326 return ACE_WIN32_Asynch_Result::offset ();
00327 }
|
|
|
Offset_high associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 330 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high.
00331 {
00332 return ACE_WIN32_Asynch_Result::offset_high ();
00333 }
|
|
|
Post <this> to the Proactor's completion port.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 348 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion.
00349 {
00350 return ACE_WIN32_Asynch_Result::post_completion (proactor);
00351 }
|
|
|
The priority of the asynchronous operation. Currently, this is not supported on Win32.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 336 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority.
00337 {
00338 return ACE_WIN32_Asynch_Result::priority ();
00339 }
|
|
|
Accessor for the scatter read flag.
Definition at line 354 of file WIN32_Asynch_IO.cpp. References scatter_enabled_. Referenced by ACE_WIN32_Asynch_Read_File_Result::complete, and complete.
00355 {
00356 return this->scatter_enabled_;
00357 }
|
|
|
No-op. Returns 0.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 342 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number.
00343 {
00344 return ACE_WIN32_Asynch_Result::signal_number ();
00345 }
|
|
|
Did the operation succeed?
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 300 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success. Referenced by complete.
00301 {
00302 return ACE_WIN32_Asynch_Result::success ();
00303 }
|
|
|
Factory class will have special permissions.
Definition at line 209 of file WIN32_Asynch_IO.h. |
|
|
Proactor class has special permission.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 212 of file WIN32_Asynch_IO.h. |
|
|
Bytes requested when the asynchronous read was initiated.
Definition at line 292 of file WIN32_Asynch_IO.h. Referenced by bytes_to_read. |
|
|
I/O handle used for reading.
Definition at line 298 of file WIN32_Asynch_IO.h. Referenced by handle. |
|
|
Message block for reading the data into.
Definition at line 295 of file WIN32_Asynch_IO.h. Referenced by ACE_WIN32_Asynch_Read_File_Result::complete, complete, and message_block. |
|
|
Flag for scatter read.
Definition at line 301 of file WIN32_Asynch_IO.h. Referenced by scatter_enabled. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002