---
name: "ACE_Asynch_Result"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Asynch_Result"
---

# ACE\_Asynch\_Result(3)

An interface base class which allows users access to common information related to an asynchronous operation.

## NAME

ACE\_Asynch\_Result -

An interface base class which allows users access to common information related to an asynchronous operation.

## SYNOPSIS

```
class ACE_Asynch_Result
{
  public:
    u_long bytes_transferred (void) const;
    const void *act (void) const;
    int success (void) const;
    const void *completion_key (void) const;
    u_long error (void) const;
    ACE_HANDLE event (void) const;
    u_long offset (void) const;
    u_long offset_high (void) const;
    int priority (void) const;
    int signal_number (void) const;
    virtual ~ACE_Asynch_Result (void);
  protected:
    ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation);
    ACE_Asynch_Result_Impl *implementation (void) const;
    ACE_Asynch_Result_Impl *implementation_;
};
```

## DESCRIPTION

This works on Win32 (#if defined (ACE\_WIN32) && !defined (ACE\_HAS\_WINCE)) platforms and on POSIX4 platforms with aio\_\* routines (#if defined (ACE\_HAS\_AIO\_CALLS))

On Win32 platforms, the implementation of ACE\_Asynch\_Transmit\_File and ACE\_Asynch\_Accept are only supported if ACE\_HAS\_WINSOCK2 is defined or you are on WinNT 4.0 or higher.

## PUBLIC MEMBERS

```
u_long 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;
```

This is the ACT associated with the handle on which the Asynch\_Operation takes place.

On WIN32, this returns the ACT associated with the handle when it was registered with the I/O completion port.

@@ This is not implemented for POSIX4 platforms. Returns 0.

```
u_long error (void) const;
```

Error value if the operation fails.

```
ACE_HANDLE event (void) const;
```

On WIN32, this returns the event associated with the OVERLAPPED structure.

This returns ACE\_INVALID\_HANDLE on POSIX4-Unix platforms.

```
u_long offset (void) const;
```

```
u_long offset_high (void) const;
```

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

On WIN32, these are represented in the OVERLAPPED datastructure.

@@ On POSIX4-Unix, offset\_high should be supported using\
    aiocb64.

```
int priority (void) const;
```

Priority of the operation.

On POSIX4-Unix, this is supported. Priority works like nice in    Unix. Negative values are not allowed. 0 means priority of the operation same as the process priority. 1 means priority of the operation is one less than process. And so forth.

On Win32, this is a no-op.

```
int signal_number (void) const;
```

POSIX4 real-time signal number to be used for the operation. signal\_number ranges from ACE\_SIGRTMIN to ACE\_SIGRTMAX. By  default, ACE\_SIGRTMIN is used to issue aio\_ calls. This is a no-op on non-POSIX4 systems and returns 0.

```
virtual ~ACE_Asynch_Result (void);
```

Destructor.

## PROTECTED MEMBERS

```
ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation);
```

Constructor. This implementation will not be deleted.  The implementation will be deleted by the Proactor.

```
ACE_Asynch_Result_Impl *implementation (void) const;
```

Get the implementation class.

```
ACE_Asynch_Result_Impl *implementation_;
```

Implementation class.

## AUTHOR

Irfan Pyarali irfan@cs.wustl.edu, Tim Harrison harrison@cs.wustl.edu and Alexander Babu Arulanthu alex@cs.wustl.edu

## LIBRARY

ace
