An interface base class which allows users access to common information related to an asynchronous operation.
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_;
};
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.
u_long bytes_transferred (void) const;
const void *act (void) const;
int success (void) const;
const void *completion_key (void) const;
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;
ACE_HANDLE event (void) const;
This returns ACE_INVALID_HANDLE on POSIX4-Unix platforms.
u_long offset (void) const;
u_long offset_high (void) const;
On WIN32, these are represented in the OVERLAPPED datastructure.
@@ On POSIX4-Unix, offset_high should be supported using aiocb64.
int priority (void) const;
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;
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);
ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation);
ACE_Asynch_Result_Impl *implementation (void) const;
ACE_Asynch_Result_Impl *implementation_;
Irfan Pyarali irfan@cs.wustl.edu
,
Tim Harrison harrison@cs.wustl.edu
and
Alexander Babu Arulanthu alex@cs.wustl.edu
ace