Reference

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 [email protected], Tim Harrison [email protected] and Alexander Babu Arulanthu [email protected]

LIBRARY

ace