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


Public Member Functions | |
| size_t | bytes_to_write (void) const | 
| ACE_Message_Block & | message_block (void) const | 
| Message block that contains the data to be written.   | |
| ACE_HANDLE | handle (void) const | 
| I/O handle used for writing.   | |
| 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 | gather_enabled (void) const | 
| Accessor for the gather write flag.   | |
Protected Member Functions | |
| ACE_WIN32_Asynch_Write_Stream_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, ACE_HANDLE event, int priority, int signal_number=0, int gather_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 write completes.   | |
| virtual | ~ACE_WIN32_Asynch_Write_Stream_Result (void) | 
| Destructor.   | |
Protected Attributes | |
| size_t | bytes_to_write_ | 
| ACE_Message_Block & | message_block_ | 
| Message block that contains the data to be written.   | |
| ACE_HANDLE | handle_ | 
| I/O handle used for writing.   | |
| int | gather_enabled_ | 
| Flag for gather write.   | |
Friends | |
| class | ACE_WIN32_Asynch_Write_Stream | 
| Factory class willl have special permissions.   | |
| class | ACE_WIN32_Proactor | 
| Proactor class has special permission.   | |
Definition at line 384 of file WIN32_Asynch_IO.h.
      
  | 
  ||||||||||||||||||||||||||||||||||||||||
| 
 Constructor is protected since creation is limited to ACE_Asynch_Write_Stream factory. Definition at line 666 of file WIN32_Asynch_IO.cpp. References ACE_Handler::Proxy_Ptr. 
 00676 : ACE_Asynch_Result_Impl (), 00677 ACE_Asynch_Write_Stream_Result_Impl (), 00678 ACE_WIN32_Asynch_Result 00679 (handler_proxy, act, event, 0, 0, priority, signal_number), 00680 bytes_to_write_ (bytes_to_write), 00681 message_block_ (message_block), 00682 handle_ (handle), 00683 gather_enabled_ (gather_enabled) 00684 { 00685 }  | 
  
      
  | 
  
| 
 Destructor. 
 Definition at line 728 of file WIN32_Asynch_IO.cpp. 
 00729 {
00730 }
 | 
  
      
  | 
  
| 
 ACT associated with the operation. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 742 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act(). 
 00743 {
00744   return ACE_WIN32_Asynch_Result::act ();
00745 }
 | 
  
      
  | 
  
| 
 The number of bytes which were requested at the start of the asynchronous write. Implements ACE_Asynch_Write_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 649 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Write_File_Result::bytes_to_write(), and ACE_WIN32_Asynch_Write_Stream::shared_write(). 
 00650 {
00651   return this->bytes_to_write_;
00652 }
 | 
  
      
  | 
  
| 
 Number of bytes transferred by the operation. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 736 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred(). 
 00737 {
00738   return ACE_WIN32_Asynch_Result::bytes_transferred ();
00739 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 ACE_Proactor will call this method when the write completes. 
 Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 688 of file WIN32_Asynch_IO.cpp. References ACE_Message_Block::cont(), gather_enabled(), ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_Handler::handle_write_stream(), ACE_Message_Block::length(), and ACE_Message_Block::rd_ptr(). 
 00692 {
00693   // Copy the data which was returned by <GetQueuedCompletionStatus>.
00694   this->bytes_transferred_ = bytes_transferred;
00695   this->success_ = success;
00696   this->completion_key_ = completion_key;
00697   this->error_ = error;
00698 
00699   // Appropriately move the pointers in the message block.
00700   if (!this->gather_enabled ())
00701     this->message_block_.rd_ptr (bytes_transferred);
00702   else
00703   {
00704     for (ACE_Message_Block* mb = &this->message_block_;
00705          (mb != 0) && (bytes_transferred > 0);
00706          mb = mb->cont ())
00707     {
00708       size_t len_part = mb->length ();
00709 
00710       if ( len_part > bytes_transferred)
00711         len_part = bytes_transferred;
00712 
00713       mb->rd_ptr (len_part);
00714 
00715       bytes_transferred -= len_part;
00716     }
00717   }
00718 
00719   // Create the interface result class.
00720   ACE_Asynch_Write_Stream::Result result (this);
00721 
00722   // Call the application handler.
00723   ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
00724   if (handler != 0)
00725     handler->handle_write_stream (result);
00726 }
 | 
  
      
  | 
  
| 
 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_Write_File_Result. Definition at line 754 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key(). 
 00755 {
00756   return ACE_WIN32_Asynch_Result::completion_key ();
00757 }
 | 
  
      
  | 
  
| 
 Error value if the operation fail. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 760 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error(). 
 00761 {
00762   return ACE_WIN32_Asynch_Result::error ();
00763 }
 | 
  
      
  | 
  
| 
 Event associated with the OVERLAPPED structure. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 766 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event(). 
 00767 {
00768   return ACE_WIN32_Asynch_Result::event ();
00769 }
 | 
  
      
  | 
  
| 
 Accessor for the gather write flag. 
 Definition at line 802 of file WIN32_Asynch_IO.cpp. References gather_enabled_. Referenced by ACE_WIN32_Asynch_Write_File_Result::complete(), and complete(). 
 00803 {
00804   return this->gather_enabled_;
00805 }
 | 
  
      
  | 
  
| 
 I/O handle used for writing. 
 Implements ACE_Asynch_Write_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 661 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Write_File_Result::handle(), ACE_WIN32_Asynch_Write_Stream::shared_write(), and ACE_WIN32_Asynch_Write_Stream::writev(). 
 00662 {
00663   return this->handle_;
00664 }
 | 
  
      
  | 
  
| 
 Message block that contains the data to be written. 
 Implements ACE_Asynch_Write_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 655 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Write_File_Result::message_block(), and ACE_WIN32_Asynch_Write_Stream::shared_write(). 
 00656 {
00657   return this->message_block_;
00658 }
 | 
  
      
  | 
  
| 
 This really make sense only when doing file I/O. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 772 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset(). 
 00773 {
00774   return ACE_WIN32_Asynch_Result::offset ();
00775 }
 | 
  
      
  | 
  
| 
 Offset_high associated with the OVERLAPPED structure. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 778 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high(). 
 00779 {
00780   return ACE_WIN32_Asynch_Result::offset_high ();
00781 }
 | 
  
      
  | 
  
| 
 Post to the Proactor's completion port. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 796 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion(). 
 00797 {
00798   return ACE_WIN32_Asynch_Result::post_completion (proactor);
00799 }
 | 
  
      
  | 
  
| 
 The priority of the asynchronous operation. Currently, this is not supported on Win32. Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 784 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority(). 
 00785 {
00786   return ACE_WIN32_Asynch_Result::priority ();
00787 }
 | 
  
      
  | 
  
| 
 No-op. Returns 0. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 790 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number(). 
 00791 {
00792   return ACE_WIN32_Asynch_Result::signal_number ();
00793 }
 | 
  
      
  | 
  
| 
 Did the operation succeed? 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 748 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success(). 
 00749 {
00750   return ACE_WIN32_Asynch_Result::success ();
00751 }
 | 
  
      
  | 
  
| 
 Factory class willl have special permissions. 
 Definition at line 388 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 Proactor class has special permission. 
 Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 391 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 The number of bytes which were requested at the start of the asynchronous write. Definition at line 472 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 Flag for gather write. 
 Definition at line 481 of file WIN32_Asynch_IO.h. Referenced by gather_enabled().  | 
  
      
  | 
  
| 
 I/O handle used for writing. 
 Definition at line 478 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 Message block that contains the data to be written. 
 Definition at line 475 of file WIN32_Asynch_IO.h.  | 
  
 
1.3.6