ACE_POSIX_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 <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Connect_Result:

Inheritance graph
Collaboration diagram for ACE_POSIX_Asynch_Connect_Result:

Collaboration graph
List of all members.

Public Member Functions

ACE_HANDLE connect_handle (void) const
 I/O handle for the connection.

Protected Member Functions

 ACE_POSIX_Asynch_Connect_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE connect_handle, const void *act, ACE_HANDLE event, int priority, int signal_number)
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_POSIX_Asynch_Connect_Result (void)

void connect_handle (ACE_HANDLE handle)


class ACE_POSIX_Asynch_Connect
 Factory classes will have special permissions.

class ACE_POSIX_Proactor
 The Proactor constructs the Result class for faking results.

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 a completion handler to uniquely identify the completion of the asynchronous connect.

Definition at line 764 of file POSIX_Asynch_IO.h.

Constructor & Destructor Documentation

ACE_POSIX_Asynch_Connect_Result::ACE_POSIX_Asynch_Connect_Result const ACE_Handler::Proxy_Ptr handler_proxy,
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.

Definition at line 1152 of file POSIX_Asynch_IO.cpp.

References ACE_Handler::Proxy_Ptr.

01158   : ACE_POSIX_Asynch_Result
01159       (handler_proxy, act, event, 0, 0, priority, signal_number)
01160 {
01161   this->aio_fildes = connect_handle;
01162   this->aio_nbytes = 0;
01163 }

ACE_POSIX_Asynch_Connect_Result::~ACE_POSIX_Asynch_Connect_Result void   )  [protected, virtual]


Definition at line 1186 of file POSIX_Asynch_IO.cpp.

01187 {
01188 }

Member Function Documentation

void ACE_POSIX_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 1166 of file POSIX_Asynch_IO.cpp.

References ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), and ACE_Handler::handle_connect().

01170 {
01171   // Copy the data.
01172   this->bytes_transferred_ = bytes_transferred;
01173   this->success_ = success;
01174   this->completion_key_ = completion_key;
01175   this->error_ = error;
01177   // Create the interface result class.
01178   ACE_Asynch_Connect::Result result (this);
01180   // Call the application handler.
01181   ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
01182   if (handler != 0)
01183     handler->handle_connect (result);
01184 }

void ACE_POSIX_Asynch_Connect_Result::connect_handle ACE_HANDLE  handle  )  [protected]

Definition at line 1145 of file POSIX_Asynch_IO.cpp.

01146 {
01147   this->aio_fildes = handle;
01148 }

ACE_HANDLE ACE_POSIX_Asynch_Connect_Result::connect_handle void   )  const [virtual]

I/O handle for the connection.

Implements ACE_Asynch_Connect_Result_Impl.

Definition at line 1140 of file POSIX_Asynch_IO.cpp.

Referenced by ACE_POSIX_Asynch_Connect::connect(), ACE_POSIX_Asynch_Connect::connect_i(), and ACE_POSIX_Asynch_Connect::post_result().

01141 {
01142   return this->aio_fildes;
01143 }

Friends And Related Function Documentation

friend class ACE_POSIX_Asynch_Connect [friend]

Factory classes will have special permissions.

Definition at line 768 of file POSIX_Asynch_IO.h.

friend class ACE_POSIX_Proactor [friend]

The Proactor constructs the Result class for faking results.

Definition at line 771 of file POSIX_Asynch_IO.h.

The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:26:32 2006 for ACE by doxygen 1.3.6