#include <POSIX_Asynch_IO.h>
Inheritance diagram for ACE_POSIX_Asynch_Read_Stream_Result:


Public Member Functions | |
| size_t | bytes_to_read (void) const |
| ACE_Message_Block & | message_block (void) const |
| Message block which contains the read data. | |
| ACE_HANDLE | handle (void) const |
| I/O handle used for reading. | |
Protected Member Functions | |
| ACE_POSIX_Asynch_Read_Stream_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event, int priority, int signal_number) | |
| virtual void | complete (size_t bytes_transferred, int success, const void *completion_key, u_long error) |
| virtual | ~ACE_POSIX_Asynch_Read_Stream_Result (void) |
| Destructor. | |
Protected Attributes | |
| ACE_Message_Block & | message_block_ |
| Message block for reading the data into. | |
Friends | |
| class | ACE_POSIX_Asynch_Read_Stream |
| Factory classes will have special permissions. | |
| class | ACE_POSIX_Proactor |
| The Proactor constructs the Result class for faking results. | |
Definition at line 225 of file POSIX_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 235 of file POSIX_Asynch_IO.cpp. References ACE_Handler::Proxy_Ptr.
00243 : ACE_POSIX_Asynch_Result 00244 (handler_proxy, act, event, 0, 0, priority, signal_number), 00245 message_block_ (message_block) 00246 { 00247 this->aio_fildes = handle; 00248 this->aio_buf = message_block.wr_ptr (); 00249 this->aio_nbytes = bytes_to_read; 00250 } |
|
|
Destructor.
Definition at line 278 of file POSIX_Asynch_IO.cpp.
00279 {
00280 }
|
|
|
The number of bytes which were requested at the start of the asynchronous read. Implements ACE_Asynch_Read_Stream_Result_Impl. Definition at line 217 of file POSIX_Asynch_IO.cpp.
00218 {
00219 return this->aio_nbytes;
00220 }
|
|
||||||||||||||||||||
|
Get the data copied to this class, before calling application handler. Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_POSIX_Asynch_Read_File_Result. Definition at line 253 of file POSIX_Asynch_IO.cpp. References ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_Handler::handle_read_stream(), message_block_, and ACE_Message_Block::wr_ptr().
00257 {
00258 this->bytes_transferred_ = bytes_transferred;
00259 this->success_ = success;
00260 this->completion_key_ = completion_key;
00261 this->error_ = error;
00262
00263 // <errno> is available in the aiocb.
00264 ACE_UNUSED_ARG (error);
00265
00266 // Appropriately move the pointers in the message block.
00267 this->message_block_.wr_ptr (bytes_transferred);
00268
00269 // Create the interface result class.
00270 ACE_Asynch_Read_Stream::Result result (this);
00271
00272 // Call the application handler.
00273 ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
00274 if (handler != 0)
00275 handler->handle_read_stream (result);
00276 }
|
|
|
I/O handle used for reading.
Implements ACE_Asynch_Read_Stream_Result_Impl. Definition at line 229 of file POSIX_Asynch_IO.cpp.
00230 {
00231 return this->aio_fildes;
00232 }
|
|
|
Message block which contains the read data.
Implements ACE_Asynch_Read_Stream_Result_Impl. Definition at line 223 of file POSIX_Asynch_IO.cpp. References message_block_.
00224 {
00225 return this->message_block_;
00226 }
|
|
|
Factory classes will have special permissions.
Definition at line 230 of file POSIX_Asynch_IO.h. |
|
|
The Proactor constructs the Result class for faking results.
Reimplemented in ACE_POSIX_Asynch_Read_File_Result. Definition at line 233 of file POSIX_Asynch_IO.h. |
|
|
Message block for reading the data into.
Definition at line 272 of file POSIX_Asynch_IO.h. Referenced by complete(), and message_block(). |
1.3.6