ACE_POSIX_Asynch_Connect Class Reference

#include <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Connect:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Connect:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_POSIX_Asynch_Connect (ACE_POSIX_Proactor *posix_proactor)
 Constructor.
virtual ~ACE_POSIX_Asynch_Connect (void)
 Destructor.
int open (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE handle, const void *completion_key, ACE_Proactor *proactor=0)
int connect (ACE_HANDLE connect_handle, const ACE_Addr &remote_sap, const ACE_Addr &local_sap, int reuse_addr, const void *act, int priority, int signal_number=0)
int cancel (void)
int close (void)
ACE_HANDLE get_handle (void) const
 virtual from ACE_Event_Handler
void set_handle (ACE_HANDLE handle)
 virtual from ACE_Event_Handler
int handle_output (ACE_HANDLE handle)
int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
 virtual from ACE_Event_Handler

Private Types

typedef ACE_Map_Manager< ACE_HANDLE,
ACE_POSIX_Asynch_Connect_Result *,
ACE_SYNCH_NULL_MUTEX > 
MAP_MANAGER
typedef MAP_MANAGER::ITERATOR MAP_ITERATOR
typedef MAP_MANAGER::ENTRY MAP_ENTRY

Private Member Functions

int connect_i (ACE_POSIX_Asynch_Connect_Result *result, const ACE_Addr &remote_sap, const ACE_Addr &local_sap, int reuse_addr)
int post_result (ACE_POSIX_Asynch_Connect_Result *result, bool flg_post)
int cancel_uncompleted (bool flg_notify, ACE_Handle_Set &set)
 Cancel uncompleted connect operations.

Private Attributes

bool flg_open_
MAP_MANAGER result_map_
 Map of Result pointers that correspond to all the pending connects.
ACE_SYNCH_MUTEX lock_

Member Typedef Documentation

typedef MAP_MANAGER::ENTRY ACE_POSIX_Asynch_Connect::MAP_ENTRY [private]

typedef MAP_MANAGER::ITERATOR ACE_POSIX_Asynch_Connect::MAP_ITERATOR [private]

Deprecated:
(Two) Deprecated typedefs. Use the map traits instead.

typedef ACE_Map_Manager<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX> ACE_POSIX_Asynch_Connect::MAP_MANAGER [private]

true - Connect is registered in ACE_Asynch_Pseudo_Task false - Aceept is deregisted in ACE_Asynch_Pseudo_Task


Constructor & Destructor Documentation

ACE_POSIX_Asynch_Connect::ACE_POSIX_Asynch_Connect ( ACE_POSIX_Proactor posix_proactor  ) 

Constructor.

ACE_POSIX_Asynch_Connect::~ACE_POSIX_Asynch_Connect ( void   )  [virtual]

Destructor.


Member Function Documentation

int ACE_POSIX_Asynch_Connect::cancel ( void   )  [virtual]

Cancel all pending pseudo-asynchronus requests Behavior as usual AIO request

Reimplemented from ACE_POSIX_Asynch_Operation.

int ACE_POSIX_Asynch_Connect::cancel_uncompleted ( bool  flg_notify,
ACE_Handle_Set set 
) [private]

Cancel uncompleted connect operations.

int ACE_POSIX_Asynch_Connect::close ( void   ) 

Close performs cancellation of all pending requests.

int ACE_POSIX_Asynch_Connect::connect ( ACE_HANDLE  connect_handle,
const ACE_Addr remote_sap,
const ACE_Addr local_sap,
int  reuse_addr,
const void *  act,
int  priority,
int  signal_number = 0 
) [virtual]

This starts off an asynchronous connect.

Implements ACE_Asynch_Connect_Impl.

int ACE_POSIX_Asynch_Connect::connect_i ( ACE_POSIX_Asynch_Connect_Result result,
const ACE_Addr remote_sap,
const ACE_Addr local_sap,
int  reuse_addr 
) [private]

ACE_HANDLE ACE_POSIX_Asynch_Connect::get_handle ( void   )  const [virtual]

virtual from ACE_Event_Handler

Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::handle_close ( ACE_HANDLE  handle,
ACE_Reactor_Mask  close_mask 
) [virtual]

virtual from ACE_Event_Handler

Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::handle_output ( ACE_HANDLE  handle  )  [virtual]

virtual from ACE_Event_Handler The default action on handle_input() and handle_exception is to return -1. Since that's what we want to do, just reuse them. handle_output(), however, is where successful connects are reported.

Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::open ( const ACE_Handler::Proxy_Ptr handler_proxy,
ACE_HANDLE  handle,
const void *  completion_key,
ACE_Proactor proactor = 0 
) [virtual]

This belongs to ACE_POSIX_Asynch_Operation. We forward this call to that method. We have put this here to avoid the compiler warnings.

Reimplemented from ACE_POSIX_Asynch_Operation.

int ACE_POSIX_Asynch_Connect::post_result ( ACE_POSIX_Asynch_Connect_Result result,
bool  flg_post 
) [private]

void ACE_POSIX_Asynch_Connect::set_handle ( ACE_HANDLE  handle  )  [virtual]

virtual from ACE_Event_Handler

Reimplemented from ACE_Event_Handler.


Member Data Documentation

bool ACE_POSIX_Asynch_Connect::flg_open_ [private]

ACE_SYNCH_MUTEX ACE_POSIX_Asynch_Connect::lock_ [private]

The lock to protect the result map which is shared. The queue is updated by main thread in the register function call and through the auxillary thread in the asynch pseudo task.

MAP_MANAGER ACE_POSIX_Asynch_Connect::result_map_ [private]

Map of Result pointers that correspond to all the pending connects.


The documentation for this class was generated from the following files:
Generated on Sun Jul 9 09:24:23 2006 for ACE by  doxygen 1.4.7-1