Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_WIN32_Asynch_Connect_Result Class Reference

This is that class which will be passed back to the completion handler when the asynchronous connect completes. More...

#include <WIN32_Asynch_IO.h>

Inheritance diagram for ACE_WIN32_Asynch_Connect_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_WIN32_Asynch_Connect_Result:

Collaboration graph
[legend]
List of all members.

Public Methods

ACE_HANDLE connect_handle (void) const
 I/O handle for the connection. 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 object to the Proactor's completion port. More...


Protected Methods

 ACE_WIN32_Asynch_Connect_Result (ACE_Handler &handler, ACE_HANDLE connect_handle, const void *act, ACE_HANDLE event, int priority, int signal_number)
 Constructor is protected since creation is limited to ACE_Asynch_Connect factory. More...

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. More...

virtual ~ACE_WIN32_Asynch_Connect_Result (void)
 Destructor. More...

void connect_handle (ACE_HANDLE handle)
 Set the I/O handle for the new connection. More...


Protected Attributes

ACE_HANDLE connect_handle_

Friends

class ACE_WIN32_Asynch_Connect
 Factory classes will have special permissions. More...

class ACE_WIN32_Proactor
 The Proactor constructs the Result class for faking results. More...


Detailed Description

This is that class which will be passed back to the completion handler when the asynchronous connect completes.

This class has all the information necessary for the completion handler to uniquiely identify the completion of the asynchronous connect.

Definition at line 1147 of file WIN32_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_WIN32_Asynch_Connect_Result::ACE_WIN32_Asynch_Connect_Result ACE_Handler   handler,
ACE_HANDLE    connect_handle,
const void *    act,
ACE_HANDLE    event,
int    priority,
int    signal_number
[protected]
 

Constructor is protected since creation is limited to ACE_Asynch_Connect factory.

Definition at line 2143 of file WIN32_Asynch_IO.cpp.

02149   : ACE_Asynch_Result_Impl (),
02150     ACE_Asynch_Connect_Result_Impl (),
02151     ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
02152     connect_handle_ ( connect_handle )
02153 {
02154   ;
02155 }

ACE_WIN32_Asynch_Connect_Result::~ACE_WIN32_Asynch_Connect_Result void    [protected, virtual]
 

Destructor.

Definition at line 2176 of file WIN32_Asynch_IO.cpp.

02177 {
02178 }


Member Function Documentation

const void * ACE_WIN32_Asynch_Connect_Result::act void    const [virtual]
 

ACT associated with the operation.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2190 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::act.

02191 {
02192   return ACE_WIN32_Asynch_Result::act ();
02193 }

size_t ACE_WIN32_Asynch_Connect_Result::bytes_transferred void    const [virtual]
 

Number of bytes transferred by the operation.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2184 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::bytes_transferred.

Referenced by complete.

02185 {
02186   return ACE_WIN32_Asynch_Result::bytes_transferred ();
02187 }

void ACE_WIN32_Asynch_Connect_Result::complete size_t    bytes_transferred,
int    success,
const void *    completion_key,
u_long    error
[protected, virtual]
 

ACE_Proactor will call this method when the accept completes.

Implements ACE_Asynch_Result_Impl.

Definition at line 2158 of file WIN32_Asynch_IO.cpp.

References bytes_transferred, ACE_WIN32_Asynch_Result::bytes_transferred_, completion_key, ACE_WIN32_Asynch_Result::completion_key_, error, ACE_WIN32_Asynch_Result::error_, ACE_Handler::handle_connect, ACE_WIN32_Asynch_Result::handler_, success, and ACE_WIN32_Asynch_Result::success_.

02162 {
02163   // Copy the data.
02164   this->bytes_transferred_ = bytes_transferred;
02165   this->success_ = success;
02166   this->completion_key_ = completion_key;
02167   this->error_ = error;
02168 
02169   // Create the interface result class.
02170   ACE_Asynch_Connect::Result result (this);
02171 
02172   // Call the application handler.
02173   this->handler_.handle_connect (result);
02174 }

const void * ACE_WIN32_Asynch_Connect_Result::completion_key void    const [virtual]
 

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 2202 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::completion_key.

Referenced by complete.

02203 {
02204   return ACE_WIN32_Asynch_Result::completion_key ();
02205 }

void ACE_WIN32_Asynch_Connect_Result::connect_handle ACE_HANDLE    handle [protected]
 

Set the I/O handle for the new connection.

Definition at line 2136 of file WIN32_Asynch_IO.cpp.

References connect_handle_.

02137 {
02138   this->connect_handle_ = handle;
02139 }

ACE_HANDLE ACE_WIN32_Asynch_Connect_Result::connect_handle void    const [virtual]
 

I/O handle for the connection.

Implements ACE_Asynch_Connect_Result_Impl.

Definition at line 2131 of file WIN32_Asynch_IO.cpp.

References connect_handle_.

Referenced by ACE_WIN32_Asynch_Connect::connect, ACE_WIN32_Asynch_Connect::connect_i, and ACE_WIN32_Asynch_Connect::post_result.

02132 {
02133   return this->connect_handle_;
02134 }

u_long ACE_WIN32_Asynch_Connect_Result::error void    const [virtual]
 

Error value if the operation fail.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2208 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::error.

Referenced by complete.

02209 {
02210   return ACE_WIN32_Asynch_Result::error ();
02211 }

ACE_HANDLE ACE_WIN32_Asynch_Connect_Result::event void    const [virtual]
 

Event associated with the OVERLAPPED structure.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2214 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::event.

02215 {
02216   return ACE_WIN32_Asynch_Result::event ();
02217 }

u_long ACE_WIN32_Asynch_Connect_Result::offset void    const [virtual]
 

This really make sense only when doing file I/O.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2220 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::offset.

02221 {
02222   return ACE_WIN32_Asynch_Result::offset ();
02223 }

u_long ACE_WIN32_Asynch_Connect_Result::offset_high void    const [virtual]
 

Offset_high associated with the OVERLAPPED structure.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2226 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::offset_high.

02227 {
02228   return ACE_WIN32_Asynch_Result::offset_high ();
02229 }

int ACE_WIN32_Asynch_Connect_Result::post_completion ACE_Proactor_Impl   proactor [virtual]
 

Post this object to the Proactor's completion port.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2244 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::post_completion.

02245 {
02246   return ACE_WIN32_Asynch_Result::post_completion (proactor);
02247 }

int ACE_WIN32_Asynch_Connect_Result::priority void    const [virtual]
 

The priority of the asynchronous operation. Currently, this is not supported on Win32.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2232 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::priority.

02233 {
02234   return ACE_WIN32_Asynch_Result::priority ();
02235 }

int ACE_WIN32_Asynch_Connect_Result::signal_number void    const [virtual]
 

No-op. Returns 0.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2238 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::signal_number.

02239 {
02240   return ACE_WIN32_Asynch_Result::signal_number ();
02241 }

int ACE_WIN32_Asynch_Connect_Result::success void    const [virtual]
 

Did the operation succeed?

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2196 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::success.

Referenced by complete.

02197 {
02198   return ACE_WIN32_Asynch_Result::success ();
02199 }


Friends And Related Function Documentation

friend class ACE_WIN32_Asynch_Connect [friend]
 

Factory classes will have special permissions.

Definition at line 1151 of file WIN32_Asynch_IO.h.

friend class ACE_WIN32_Proactor [friend]
 

The Proactor constructs the Result class for faking results.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 1154 of file WIN32_Asynch_IO.h.


Member Data Documentation

ACE_HANDLE ACE_WIN32_Asynch_Connect_Result::connect_handle_ [protected]
 

Definition at line 1224 of file WIN32_Asynch_IO.h.

Referenced by connect_handle.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:59:40 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002