#include <Asynch_IO.h>
Inheritance diagram for ACE_Asynch_Operation:


Public Methods | |
| int | open (ACE_Handler &handler, ACE_HANDLE handle, const void *completion_key, ACE_Proactor *proactor) |
| int | cancel (void) |
| ACE_Proactor * | proactor (void) const |
| Return the underlying proactor. More... | |
| virtual | ~ACE_Asynch_Operation (void) |
| Destructor. More... | |
Protected Methods | |
| ACE_Asynch_Operation (void) | |
| Constructor. More... | |
| ACE_Asynch_Operation_Impl * | implementation (void) const |
| Return the underlying implementation class. More... | |
| void | implementation (ACE_Asynch_Operation_Impl *implementation) |
| Set the implementation class. More... | |
| ACE_Proactor * | get_proactor (ACE_Proactor *user_proactor, ACE_Handler &handler) const |
| Get a proactor for/from the user. More... | |
Protected Attributes | |
| ACE_Asynch_Operation_Impl * | implementation_ |
| Implementation class. More... | |
There are some attributes and functionality which is common to all asychronous operations. The delegation classes of this class will factor out this code.
Definition at line 160 of file Asynch_IO.h.
|
|
Destructor.
Definition at line 129 of file Asynch_IO.cpp. References implementation_.
00130 {
00131 delete this->implementation_;
00132 this->implementation_ = 0;
00133 }
|
|
|
Constructor.
Definition at line 124 of file Asynch_IO.cpp.
00125 : implementation_ (0) 00126 { 00127 } |
|
|
(Attempts to) cancel the asynchronous operation pending against the <handle> registered with this Operation. All completion notifications for the I/O operations will occur normally. = Return Values: -1 : Operation failed. (can get only in POSIX). 0 : All the operations were cancelled. 1 : All the operations were already finished in this handle. Unable to cancel them. 2 : Atleast one of the requested operations cannot be cancelled. There is slight difference in the semantics between NT and POSIX platforms which is given below. = Win32 : cancels all pending accepts operations that were issued by the calling thread. The function does not cancel asynchronous operations issued by other threads. All I/O operations that are canceled will complete with the error ERROR_OPERATION_ABORTED. = POSIX: Attempts to cancel one or more asynchronous I/O requests currently outstanding against the <handle> registered in this operation. For requested operations that are successfully canceled, the associated error status is set to ECANCELED. Definition at line 107 of file Asynch_IO.cpp. References ACE_Asynch_Operation_Impl::cancel, and implementation. Referenced by ACE_Asynch_Connector::cancel, and ACE_Asynch_Acceptor::cancel.
00108 {
00109 return this->implementation ()->cancel ();
00110 }
|
|
||||||||||||
|
Get a proactor for/from the user.
Definition at line 142 of file Asynch_IO.cpp. References ACE_Proactor::instance, and ACE_Handler::proactor. Referenced by ACE_Asynch_Write_Dgram::open, ACE_Asynch_Read_Dgram::open, ACE_Asynch_Transmit_File::open, ACE_Asynch_Connect::open, ACE_Asynch_Accept::open, ACE_Asynch_Write_File::open, ACE_Asynch_Read_File::open, ACE_Asynch_Write_Stream::open, and ACE_Asynch_Read_Stream::open.
00144 {
00145 if (user_proactor == 0)
00146 {
00147 // Grab the singleton proactor if <handler->proactor> is zero
00148 user_proactor = handler.proactor ();
00149 if (user_proactor == 0)
00150 user_proactor = ACE_Proactor::instance ();
00151 }
00152
00153 return user_proactor;
00154 }
|
|
|
Set the implementation class.
Definition at line 136 of file Asynch_IO.cpp. References implementation_.
00137 {
00138 this->implementation_ = implementation;
00139 }
|
|
|
Return the underlying implementation class.
Reimplemented in ACE_Asynch_Read_Stream. Definition at line 119 of file Asynch_IO.cpp. References implementation_. Referenced by cancel, ACE_Asynch_Write_Dgram::implementation, ACE_Asynch_Read_Dgram::implementation, ACE_Asynch_Transmit_File::implementation, ACE_Asynch_Connect::implementation, ACE_Asynch_Accept::implementation, ACE_Asynch_Write_Stream::implementation, ACE_Asynch_Read_Stream::implementation, open, and proactor.
00120 {
00121 return this->implementation_;
00122 }
|
|
||||||||||||||||||||
|
Initializes the factory with information which will be used with each asynchronous call. If (<handle> == ACE_INVALID_HANDLE), <ACE_Handler::handle> will be called on the <handler> to get the correct handle. Reimplemented in ACE_Asynch_Read_Stream. Definition at line 95 of file Asynch_IO.cpp. References implementation, and ACE_Asynch_Operation_Impl::open. Referenced by ACE_Asynch_Write_Dgram::open, ACE_Asynch_Read_Dgram::open, ACE_Asynch_Transmit_File::open, ACE_Asynch_Connect::open, ACE_Asynch_Accept::open, ACE_Asynch_Write_File::open, ACE_Asynch_Read_File::open, ACE_Asynch_Write_Stream::open, and ACE_Asynch_Read_Stream::open.
00099 {
00100 return this->implementation ()->open (handler,
00101 handle,
00102 completion_key,
00103 proactor);
00104 }
|
|
|
Return the underlying proactor.
Definition at line 113 of file Asynch_IO.cpp. References implementation, and ACE_Asynch_Operation_Impl::proactor.
00114 {
00115 return this->implementation ()->proactor ();
00116 }
|
|
|
Implementation class.
Reimplemented in ACE_Asynch_Read_Stream. Definition at line 236 of file Asynch_IO.h. Referenced by implementation, and ~ACE_Asynch_Operation. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002