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


Public Member Functions | |
| 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. | |
| 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. | |
| int | post_completion (ACE_Proactor_Impl *proactor) |
| Post to the Proactor's completion port. | |
| int | scatter_enabled (void) const |
| Accessor for the scatter read flag. | |
Protected Member Functions | |
| ACE_WIN32_Asynch_Read_Stream_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, 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) | |
| 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. | |
| virtual | ~ACE_WIN32_Asynch_Read_Stream_Result (void) |
| Destructor. | |
Protected Attributes | |
| size_t | bytes_to_read_ |
| Bytes requested when the asynchronous read was initiated. | |
| ACE_Message_Block & | message_block_ |
| Message block for reading the data into. | |
| ACE_HANDLE | handle_ |
| I/O handle used for reading. | |
| int | scatter_enabled_ |
| Flag for scatter read. | |
Friends | |
| class | ACE_WIN32_Asynch_Read_Stream |
| Factory class will have special permissions. | |
| class | ACE_WIN32_Proactor |
| Proactor class has special permission. | |
Definition at line 207 of file WIN32_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||
|
Constructor is protected since creation is limited to ACE_Asynch_Read_Stream factory. Definition at line 232 of file WIN32_Asynch_IO.cpp. References ACE_Handler::Proxy_Ptr.
00242 : ACE_Asynch_Result_Impl (), 00243 ACE_Asynch_Read_Stream_Result_Impl (), 00244 ACE_WIN32_Asynch_Result (handler_proxy, 00245 act, 00246 event, 00247 0, 00248 0, 00249 priority, 00250 signal_number), 00251 bytes_to_read_ (bytes_to_read), 00252 message_block_ (message_block), 00253 handle_ (handle), 00254 scatter_enabled_ (scatter_enabled) 00255 { 00256 } |
|
|
Destructor.
Definition at line 299 of file WIN32_Asynch_IO.cpp.
00300 {
00301 }
|
|
|
ACT associated with the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 313 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act().
00314 {
00315 return ACE_WIN32_Asynch_Result::act ();
00316 }
|
|
|
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 215 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Read_File_Result::bytes_to_read(), and ACE_WIN32_Asynch_Read_Stream::shared_read().
00216 {
00217 return this->bytes_to_read_;
00218 }
|
|
|
Number of bytes transferred by the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 307 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred().
00308 {
00309 return ACE_WIN32_Asynch_Result::bytes_transferred ();
00310 }
|
|
||||||||||||||||||||
|
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 259 of file WIN32_Asynch_IO.cpp. References ACE_Message_Block::cont(), ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_Handler::handle_read_stream(), scatter_enabled(), ACE_Message_Block::space(), and ACE_Message_Block::wr_ptr().
00263 {
00264 // Copy the data which was returned by GetQueuedCompletionStatus
00265 this->bytes_transferred_ = bytes_transferred;
00266 this->success_ = success;
00267 this->completion_key_ = completion_key;
00268 this->error_ = error;
00269
00270 // Appropriately move the pointers in the message block.
00271 if (!this->scatter_enabled ())
00272 this->message_block_.wr_ptr (bytes_transferred);
00273 else
00274 {
00275 for (ACE_Message_Block* mb = &this->message_block_;
00276 (mb != 0) && (bytes_transferred > 0);
00277 mb = mb->cont ())
00278 {
00279 size_t len_part = mb->space ();
00280
00281 if (len_part > bytes_transferred)
00282 len_part = bytes_transferred;
00283
00284 mb->wr_ptr (len_part);
00285
00286 bytes_transferred -= len_part;
00287 }
00288 }
00289
00290 // Create the interface result class.
00291 ACE_Asynch_Read_Stream::Result result (this);
00292
00293 // Call the application handler.
00294 ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
00295 if (handler != 0)
00296 handler->handle_read_stream (result);
00297 }
|
|
|
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 325 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key().
00326 {
00327 return ACE_WIN32_Asynch_Result::completion_key ();
00328 }
|
|
|
Error value if the operation fail.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 331 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error().
00332 {
00333 return ACE_WIN32_Asynch_Result::error ();
00334 }
|
|
|
Event associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 337 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event().
00338 {
00339 return ACE_WIN32_Asynch_Result::event ();
00340 }
|
|
|
I/O handle used for reading.
Implements ACE_Asynch_Read_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 227 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Read_File_Result::handle(), ACE_WIN32_Asynch_Read_Stream::readv(), and ACE_WIN32_Asynch_Read_Stream::shared_read().
00228 {
00229 return this->handle_;
00230 }
|
|
|
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 221 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Read_File_Result::message_block(), and ACE_WIN32_Asynch_Read_Stream::shared_read().
00222 {
00223 return this->message_block_;
00224 }
|
|
|
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 343 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset().
00344 {
00345 return ACE_WIN32_Asynch_Result::offset ();
00346 }
|
|
|
Offset_high associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 349 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high().
00350 {
00351 return ACE_WIN32_Asynch_Result::offset_high ();
00352 }
|
|
|
Post to the Proactor's completion port.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 367 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion().
00368 {
00369 return ACE_WIN32_Asynch_Result::post_completion (proactor);
00370 }
|
|
|
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 355 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority().
00356 {
00357 return ACE_WIN32_Asynch_Result::priority ();
00358 }
|
|
|
Accessor for the scatter read flag.
Definition at line 373 of file WIN32_Asynch_IO.cpp. References scatter_enabled_. Referenced by ACE_WIN32_Asynch_Read_File_Result::complete(), and complete().
00374 {
00375 return this->scatter_enabled_;
00376 }
|
|
|
No-op. Returns 0.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 361 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number().
00362 {
00363 return ACE_WIN32_Asynch_Result::signal_number ();
00364 }
|
|
|
Did the operation succeed?
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Read_File_Result. Definition at line 319 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success().
00320 {
00321 return ACE_WIN32_Asynch_Result::success ();
00322 }
|
|
|
Factory class will have special permissions.
Definition at line 211 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 214 of file WIN32_Asynch_IO.h. |
|
|
Bytes requested when the asynchronous read was initiated.
Definition at line 294 of file WIN32_Asynch_IO.h. |
|
|
I/O handle used for reading.
Definition at line 300 of file WIN32_Asynch_IO.h. |
|
|
Message block for reading the data into.
Definition at line 297 of file WIN32_Asynch_IO.h. |
|
|
Flag for scatter read.
Definition at line 303 of file WIN32_Asynch_IO.h. Referenced by scatter_enabled(). |
1.3.6