# ACE_WIN32_Asynch_Result Class Reference

An abstract class which adds information to the OVERLAPPED structure to make it more useful. More...

`#include <WIN32_Asynch_IO.h>`

Inheritance diagram for ACE_WIN32_Asynch_Result:

[legend]
Collaboration diagram for ACE_WIN32_Asynch_Result:

[legend]
List of all members.

## Public Member Functions

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
| Returns 0.
int | post_completion (ACE_Proactor_Impl *proactor)
| Post <this> to the Proactor's completion port.
virtual | ~ACE_WIN32_Asynch_Result (void)
| Destructor.
void | set_error (u_long errcode)
| Simulate error value to use in the post_completion ().
void | set_bytes_transferred (size_t nbytes)
| Simulate value to use in the post_completion ().

## Protected Member Functions

| ACE_WIN32_Asynch_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, const void *act, ACE_HANDLE event, u_long offset, u_long offset_high, int priority, int signal_number=0)
| Constructor.

## Protected Attributes

ACE_Handler::Proxy_Ptr | handler_proxy_
| Proxy for the ACE_Handler that will be called back.
const void * | act_
| ACT for this operation.
size_t | bytes_transferred_
| Bytes transferred by this operation.
int | success_
| Success indicator.
const void * | completion_key_
| ACT associated with handle.
u_long | error_
| Error if operation failed.

## Friends

class | ACE_WIN32_Asynch_Accept
| Factory class has special permissions.
class | ACE_WIN32_Proactor
| Proactor class has special permission.

## Detailed Description

An abstract class which adds information to the OVERLAPPED structure to make it more useful.

An abstract base class from which you can obtain some basic information like the number of bytes transferred, the ACT associated with the asynchronous operation, indication of success or failure, etc. Subclasses may want to store more information that is particular to the asynchronous operation it represents.

## Constructor & Destructor Documentation

ACE_WIN32_Asynch_Result::~ACE_WIN32_Asynch_Result | ( | void |  | ) | `[virtual]`

| Destructor.

ACE_WIN32_Asynch_Result::ACE_WIN32_Asynch_Result | ( | const ACE_Handler::Proxy_Ptr & | handler_proxy,
|  | const void * | act,
|  | ACE_HANDLE | event,
|  | u_long | offset,
|  | u_long | offset_high,
|  | int | priority,
|  | int | signal_number = `0`
| ) | `[protected]`

| Constructor.

## Member Function Documentation

const void * ACE_WIN32_Asynch_Result::act | ( | void |  | ) | const`[virtual]`

ACT associated with the operation.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

ACE_BEGIN_VERSIONED_NAMESPACE_DECL size_t ACE_WIN32_Asynch_Result::bytes_transferred | ( | void |  | ) | const`[virtual]`

Number of bytes transferred by the operation.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

const void * ACE_WIN32_Asynch_Result::completion_key | ( | void |  | ) | const`[virtual]`

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.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

u_long ACE_WIN32_Asynch_Result::error | ( | void |  | ) | const`[virtual]`

Error value if the operation fail.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

ACE_HANDLE ACE_WIN32_Asynch_Result::event | ( | void |  | ) | const`[virtual]`

Event associated with the OVERLAPPED structure.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

u_long ACE_WIN32_Asynch_Result::offset | ( | void |  | ) | const`[virtual]`

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

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

u_long ACE_WIN32_Asynch_Result::offset_high | ( | void |  | ) | const`[virtual]`

Offset_high associated with the OVERLAPPED structure.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

int ACE_WIN32_Asynch_Result::post_completion | ( | ACE_Proactor_Impl * | proactor | ) | `[virtual]`

Post <this> to the Proactor's completion port.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

int ACE_WIN32_Asynch_Result::priority | ( | void |  | ) | const`[virtual]`

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

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

void ACE_WIN32_Asynch_Result::set_bytes_transferred | ( | size_t | nbytes | ) |

| Simulate value to use in the post_completion ().

void ACE_WIN32_Asynch_Result::set_error | ( | u_long | errcode | ) |

| Simulate error value to use in the post_completion ().

int ACE_WIN32_Asynch_Result::signal_number | ( | void |  | ) | const`[virtual]`

| Returns 0. Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

int ACE_WIN32_Asynch_Result::success | ( | void |  | ) | const`[virtual]`

Did the operation succeed?

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, and ACE_WIN32_Asynch_Write_Dgram_Result.

## Friends And Related Function Documentation

friend class ACE_WIN32_Asynch_Accept `[friend]`

| Factory class has special permissions. Reimplemented in ACE_WIN32_Asynch_Accept_Result.

friend class ACE_WIN32_Proactor `[friend]`

Proactor class has special permission.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result, ACE_WIN32_Asynch_Write_Stream_Result, ACE_WIN32_Asynch_Read_File_Result, ACE_WIN32_Asynch_Write_File_Result, ACE_WIN32_Asynch_Accept_Result, ACE_WIN32_Asynch_Connect_Result, ACE_WIN32_Asynch_Transmit_File_Result, ACE_WIN32_Asynch_Read_Dgram_Result, ACE_WIN32_Asynch_Write_Dgram_Result, and ACE_WIN32_Asynch_Timer.

## Member Data Documentation

const void* ACE_WIN32_Asynch_Result::act_ `[protected]`

| ACT for this operation.

size_t ACE_WIN32_Asynch_Result::bytes_transferred_ `[protected]`

| Bytes transferred by this operation.

const void* ACE_WIN32_Asynch_Result::completion_key_ `[protected]`

| ACT associated with handle.

u_long ACE_WIN32_Asynch_Result::error_ `[protected]`

| Error if operation failed.

ACE_Handler::Proxy_Ptr ACE_WIN32_Asynch_Result::handler_proxy_ `[protected]`

| Proxy for the ACE_Handler that will be called back.

int ACE_WIN32_Asynch_Result::success_ `[protected]`

| Success indicator.

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

- WIN32_Asynch_IO.h
- WIN32_Asynch_IO.cpp