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

# ACE_POSIX_Asynch_Connect Class Reference

`#include <POSIX_Asynch_IO.h>`

Inheritance diagram for ACE_POSIX_Asynch_Connect:

[legend]
Collaboration diagram for ACE_POSIX_Asynch_Connect:

[legend]
List of all members.

## Public Methods
| ACE_POSIX_Asynch_Connect (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
| Constructor. More...
virtual | ~ACE_POSIX_Asynch_Connect (void)
| Destructor. More...
int | open (ACE_Handler &handler, ACE_HANDLE handle, const void *completion_key, ACE_Proactor *proactor=0)
| This belongs to ACE_POSIX_Asynch_Operation. More...
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)
| This starts off an asynchronous connect. More...
int | cancel (void)
| Cancel all pending pseudo-asynchronus requests Behavior as usual AIO request. More...
int | close (void)
| Close performs cancellation of all pending requests. More...
ACE_HANDLE | get_handle (void) const
| virtual from ACE_Event_Handler. More...
void | set_handle (ACE_HANDLE handle)
| virtual from ACE_Event_Handler. More...
int | handle_input (ACE_HANDLE handle)
| virtual from ACE_Event_Handler Called when accept event comes up on <listen_hanlde>. More...
int | handle_output (ACE_HANDLE handle)
| Called when output events are possible (e.g., when flow control abates or non-blocking connection completes). More...
int | handle_exception (ACE_HANDLE handle)
| Called when an exceptional events occur (e.g., SIGURG). More...
int | handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
| virtual from ACE_Event_Handler. More...
ACE_Proactor * | proactor (void) const
| Return the underlying proactor. More...
## Private Types
typedef ACE_Map_Manager< ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX > | MAP_MANAGER
typedef ACE_Map_Iterator< ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX > | MAP_ITERATOR
typedef ACE_Map_Entry< ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *> | MAP_ENTRY
## Private Methods
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, int flg_post)
int | cancel_uncompleted (int flg_notify, ACE_Handle_Set &set)
| flg_notify Indicates whether or not we should send notification about canceled accepts. More...
## Private Attributes
int | flg_open_
int | task_lock_count_
| 1 - Connect is registered in ACE_Asynch_Pseudo_Task 0 - Aceept is deregisted in ACE_Asynch_Pseudo_Task to prevent ACE_Asynch_Pseudo_Task from deletion while we make a call to the ACE_Asynch_Pseudo_Task This is extra cost !!! we could avoid them if all applications will follow the rule: Proactor should be deleted only after deletion all AsynchOperation objects connected with it. More...
MAP_MANAGER | result_map_
| Map of Result pointers that correspond to all the <accept>'s pending. More...
ACE_SYNCH_MUTEX | lock_
| The lock to protect the result queue which is shared. The queue is updated by main thread in the register function call and through the auxillary thread in the deregister fun. So let us mutex it. More...

## Member Typedef Documentation

typedef ACE_Map_Entry<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *> ACE_POSIX_Asynch_Connect::MAP_ENTRY`[private]`

typedef ACE_Map_Iterator<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX> ACE_POSIX_Asynch_Connect::MAP_ITERATOR`[private]`

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

## Constructor & Destructor Documentation

ACE_POSIX_Asynch_Connect::ACE_POSIX_Asynch_Connect | ( | ACE_POSIX_AIOCB_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 | ( | int | flg_notify,
|  | ACE_Handle_Set & | set
| ) | `[private]`

| flg_notify Indicates whether or not we should send notification about canceled accepts. If this is 0, don't send notifications about canceled connects. If 1, notify user about canceled connects according POSIX standards we should receive notifications on canceled AIO requests.

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. connect_handle will be used for the connect call. If ACE_INVALID_HANDLE is specified, a new handle will be created. Reimplemented from 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 | fd,
|  | ACE_Reactor_Mask | close_mask
| ) | `[virtual]`

| virtual from ACE_Event_Handler. Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::handle_exception | ( | ACE_HANDLE | fd | ) | `[virtual]`

| Called when an exceptional events occur (e.g., SIGURG). Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::handle_input | ( | ACE_HANDLE | fd | ) | `[virtual]`

| virtual from ACE_Event_Handler Called when accept event comes up on <listen_hanlde>. Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::handle_output | ( | ACE_HANDLE | fd | ) | `[virtual]`

| Called when output events are possible (e.g., when flow control abates or non-blocking connection completes). Reimplemented from ACE_Event_Handler.

int ACE_POSIX_Asynch_Connect::open | ( | ACE_Handler & | handler,
|  | 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,
|  | int | post_enable
| ) | `[private]`

ACE_Proactor * ACE_POSIX_Asynch_Connect::proactor | ( | void |  | ) | const`[virtual]`

| Return the underlying proactor. Reimplemented from ACE_POSIX_Asynch_Operation.

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

| virtual from ACE_Event_Handler. Reimplemented from ACE_Event_Handler.

## Member Data Documentation

int ACE_POSIX_Asynch_Connect::flg_open_`[private]`

ACE_SYNCH_MUTEX ACE_POSIX_Asynch_Connect::lock_`[private]`

| The lock to protect the result queue which is shared. The queue is updated by main thread in the register function call and through the auxillary thread in the deregister fun. So let us mutex it.

MAP_MANAGER ACE_POSIX_Asynch_Connect::result_map_`[private]`

| Map of Result pointers that correspond to all the <accept>'s pending.

int ACE_POSIX_Asynch_Connect::task_lock_count_`[private]`

| 1 - Connect is registered in ACE_Asynch_Pseudo_Task 0 - Aceept is deregisted in ACE_Asynch_Pseudo_Task to prevent ACE_Asynch_Pseudo_Task from deletion while we make a call to the ACE_Asynch_Pseudo_Task This is extra cost !!! we could avoid them if all applications will follow the rule: Proactor should be deleted only after deletion all AsynchOperation objects connected with it.

The documentation for this class was generated from the following files:

- POSIX_Asynch_IO.h
- POSIX_Asynch_IO.cpp