#include <WIN32_Asynch_IO.h>
Inheritance diagram for ACE_WIN32_Asynch_Accept_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 | listen_handle (void) const | 
| I/O handle used for accepting new connections.   | |
| ACE_HANDLE | accept_handle (void) const | 
| I/O handle for the new connection.   | |
| 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.   | |
Protected Member Functions | |
| ACE_WIN32_Asynch_Accept_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE listen_handle, ACE_HANDLE accept_handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event, int priority, int signal_number=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 accept completes.   | |
| virtual | ~ACE_WIN32_Asynch_Accept_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 | listen_handle_ | 
| I/O handle used for accepting new connections.   | |
| ACE_HANDLE | accept_handle_ | 
| I/O handle for the new connection.   | |
Friends | |
| class | ACE_WIN32_Asynch_Accept | 
| Factory will have special permission.   | |
| class | ACE_WIN32_Proactor | 
| Proactor class has special permission.   | |
This class has all the information necessary for the to uniquiely identify the completion of the asynchronous accept.
Definition at line 974 of file WIN32_Asynch_IO.h.
      
  | 
  ||||||||||||||||||||||||||||||||||||||||
| 
 Constructor is protected since creation is limited to ACE_Asynch_Accept factory. Definition at line 1899 of file WIN32_Asynch_IO.cpp. References ACE_Handler::Proxy_Ptr. 
 01909 : ACE_Asynch_Result_Impl (), 01910 ACE_Asynch_Accept_Result_Impl (), 01911 ACE_WIN32_Asynch_Result (handler_proxy, 01912 act, 01913 event, 01914 0, 01915 0, 01916 priority, 01917 signal_number), 01918 bytes_to_read_ (bytes_to_read), 01919 message_block_ (message_block), 01920 listen_handle_ (listen_handle), 01921 accept_handle_ (accept_handle) 01922 { 01923 }  | 
  
      
  | 
  
| 
 Destructor. 
 Definition at line 1955 of file WIN32_Asynch_IO.cpp. 
 01956 {
01957 }
 | 
  
      
  | 
  
| 
 I/O handle for the new connection. 
 Implements ACE_Asynch_Accept_Result_Impl. Definition at line 1894 of file WIN32_Asynch_IO.cpp. References accept_handle_. Referenced by ACE_WIN32_Asynch_Accept::accept(). 
 01895 {
01896   return this->accept_handle_;
01897 }
 | 
  
      
  | 
  
| 
 ACT associated with the operation. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1969 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act(). 
 01970 {
01971   return ACE_WIN32_Asynch_Result::act ();
01972 }
 | 
  
      
  | 
  
| 
 The number of bytes which were requested at the start of the asynchronous accept. Implements ACE_Asynch_Accept_Result_Impl. Definition at line 1876 of file WIN32_Asynch_IO.cpp. 
 01877 {
01878   return this->bytes_to_read_;
01879 }
 | 
  
      
  | 
  
| 
 Number of bytes transferred by the operation. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1963 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred(). 
 01964 {
01965   return ACE_WIN32_Asynch_Result::bytes_transferred ();
01966 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 ACE_Proactor will call this method when the accept completes. 
 Implements ACE_Asynch_Result_Impl. Definition at line 1926 of file WIN32_Asynch_IO.cpp. References accept_handle_, ACE_OS::closesocket(), ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_Handler::handle_accept(), and ACE_Message_Block::wr_ptr(). 
 01930 {
01931   // Copy the data which was returned by GetQueuedCompletionStatus
01932   this->bytes_transferred_ = bytes_transferred;
01933   this->success_ = success;
01934   this->completion_key_ = completion_key;
01935   this->error_ = error;
01936 
01937   // Appropriately move the pointers in the message block.
01938   this->message_block_.wr_ptr (bytes_transferred);
01939 
01940   if (!success && this->accept_handle_ != ACE_INVALID_HANDLE)
01941     {
01942       ACE_OS::closesocket (this->accept_handle_);
01943       this->accept_handle_ = ACE_INVALID_HANDLE;
01944     }
01945 
01946   // Create the interface result class.
01947   ACE_Asynch_Accept::Result result (this);
01948 
01949   // Call the application handler.
01950   ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
01951   if (handler != 0)
01952     handler->handle_accept (result);
01953 }
 | 
  
      
  | 
  
| 
 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. Definition at line 1981 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key(). 
 01982 {
01983   return ACE_WIN32_Asynch_Result::completion_key ();
01984 }
 | 
  
      
  | 
  
| 
 Error value if the operation fail. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1987 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error(). 
 01988 {
01989   return ACE_WIN32_Asynch_Result::error ();
01990 }
 | 
  
      
  | 
  
| 
 Event associated with the OVERLAPPED structure. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1993 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event(). 
 01994 {
01995   return ACE_WIN32_Asynch_Result::event ();
01996 }
 | 
  
      
  | 
  
| 
 I/O handle used for accepting new connections. 
 Implements ACE_Asynch_Accept_Result_Impl. Definition at line 1888 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Accept::accept(). 
 01889 {
01890   return this->listen_handle_;
01891 }
 | 
  
      
  | 
  
| 
 Message block which contains the read data. 
 Implements ACE_Asynch_Accept_Result_Impl. Definition at line 1882 of file WIN32_Asynch_IO.cpp. Referenced by ACE_WIN32_Asynch_Accept::accept(). 
 01883 {
01884   return this->message_block_;
01885 }
 | 
  
      
  | 
  
| 
 This really make sense only when doing file I/O. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1999 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset(). 
 02000 {
02001   return ACE_WIN32_Asynch_Result::offset ();
02002 }
 | 
  
      
  | 
  
| 
 Offset_high associated with the OVERLAPPED structure. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2005 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high(). 
 02006 {
02007   return ACE_WIN32_Asynch_Result::offset_high ();
02008 }
 | 
  
      
  | 
  
| 
 Post to the Proactor's completion port. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2023 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion(). 
 02024 {
02025   return ACE_WIN32_Asynch_Result::post_completion (proactor);
02026 }
 | 
  
      
  | 
  
| 
 The priority of the asynchronous operation. Currently, this is not supported on Win32. Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2011 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority(). 
 02012 {
02013   return ACE_WIN32_Asynch_Result::priority ();
02014 }
 | 
  
      
  | 
  
| 
 No-op. Returns 0. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2017 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number(). 
 02018 {
02019   return ACE_WIN32_Asynch_Result::signal_number ();
02020 }
 | 
  
      
  | 
  
| 
 Did the operation succeed? 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1975 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success(). 
 01976 {
01977   return ACE_WIN32_Asynch_Result::success ();
01978 }
 | 
  
      
  | 
  
| 
 Factory will have special permission. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 978 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 Proactor class has special permission. 
 Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 981 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 I/O handle for the new connection. 
 Definition at line 1070 of file WIN32_Asynch_IO.h. Referenced by accept_handle(), and complete().  | 
  
      
  | 
  
| 
 Bytes requested when the asynchronous read was initiated. 
 Definition at line 1061 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 I/O handle used for accepting new connections. 
 Definition at line 1067 of file WIN32_Asynch_IO.h.  | 
  
      
  | 
  
| 
 Message block for reading the data into. 
 Definition at line 1064 of file WIN32_Asynch_IO.h.  | 
  
 
1.3.6