#include <POSIX_Asynch_IO.h>
Inheritance diagram for ACE_POSIX_Asynch_Read_Dgram_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. | |
| int | remote_address (ACE_Addr &addr) const |
| The address of where the packet came from. | |
| sockaddr * | saddr (void) const |
| int | flags (void) const |
| The flags used in the read. | |
| ACE_HANDLE | handle (void) const |
| I/O handle used for reading. | |
Protected Member Functions | |
| ACE_POSIX_Asynch_Read_Dgram_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE handle, ACE_Message_Block *message_block, size_t bytes_to_read, int flags, int protocol_family, const void *act, ACE_HANDLE event, int priority, int signal_number=0) | |
| virtual void | complete (size_t bytes_transferred, int success, const void *completion_key, u_long error) |
| Proactor will call this method when the read completes. | |
| virtual | ~ACE_POSIX_Asynch_Read_Dgram_Result (void) |
| Destructor. | |
Protected Attributes | |
| size_t | bytes_to_read_ |
| Bytes requested when the asynchronous read was initiated. | |
| ACE_Message_Block * | message_block_ |
| Message block for reading the data into. | |
| ACE_Addr * | remote_address_ |
| The address of where the packet came from. | |
| int | addr_len_ |
| int | flags_ |
| The flags used in the read. | |
| ACE_HANDLE | handle_ |
| I/O handle used for reading. | |
Friends | |
| class | ACE_POSIX_Asynch_Read_Dgram |
| Factory classes will have special permissions. | |
| class | ACE_POSIX_Proactor |
| Proactor class has special permission. | |
Definition at line 1229 of file POSIX_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||||||
|
Constructor is protected since creation is limited to ACE_Asynch_Read_Dgram factory. Definition at line 2186 of file POSIX_Asynch_IO.cpp. References ACE_NEW, and ACE_Handler::Proxy_Ptr.
02196 : ACE_POSIX_Asynch_Result 02197 (handler_proxy, act, event, 0, 0, priority, signal_number), 02198 bytes_to_read_ (bytes_to_read), 02199 message_block_ (message_block), 02200 remote_address_ (0), 02201 addr_len_ (0), 02202 flags_ (flags), 02203 handle_ (handle) 02204 { 02205 ACE_UNUSED_ARG (protocol_family); 02206 this->aio_fildes = handle; 02207 this->aio_nbytes = bytes_to_read; 02208 ACE_NEW (this->remote_address_, ACE_INET_Addr); 02209 } |
|
|
Destructor.
Definition at line 2237 of file POSIX_Asynch_IO.cpp. References remote_address_.
02238 {
02239 delete this->remote_address_;
02240 }
|
|
|
The number of bytes which were requested at the start of the asynchronous read. Implements ACE_Asynch_Read_Dgram_Result_Impl. Definition at line 2139 of file POSIX_Asynch_IO.cpp.
02140 {
02141 return this->bytes_to_read_;
02142 }
|
|
||||||||||||||||||||
|
Proactor will call this method when the read completes.
Implements ACE_Asynch_Result_Impl. Definition at line 2212 of file POSIX_Asynch_IO.cpp. References ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_Handler::handle_read_dgram(), remote_address_, and ACE_Addr::set_size().
02216 {
02217 // Copy the data which was returned by GetQueuedCompletionStatus
02218 this->bytes_transferred_ = bytes_transferred;
02219 this->success_ = success;
02220 this->completion_key_ = completion_key;
02221 this->error_ = error;
02222
02223 // <errno> is available in the aiocb.
02224 ACE_UNUSED_ARG (error);
02225
02226 this->remote_address_->set_size(this->addr_len_);
02227
02228 // Create the interface result class.
02229 ACE_Asynch_Read_Dgram::Result result (this);
02230
02231 // Call the application handler.
02232 ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
02233 if (handler != 0)
02234 handler->handle_read_dgram (result);
02235 }
|
|
|
The flags used in the read.
Implements ACE_Asynch_Read_Dgram_Result_Impl. Definition at line 2168 of file POSIX_Asynch_IO.cpp.
02169 {
02170 return this->flags_;
02171 }
|
|
|
I/O handle used for reading.
Implements ACE_Asynch_Read_Dgram_Result_Impl. Definition at line 2174 of file POSIX_Asynch_IO.cpp.
02175 {
02176 return this->handle_;
02177 }
|
|
|
Message block which contains the read data.
Implements ACE_Asynch_Read_Dgram_Result_Impl. Definition at line 2180 of file POSIX_Asynch_IO.cpp.
02181 {
02182 return this->message_block_;
02183 }
|
|
|
The address of where the packet came from.
Implements ACE_Asynch_Read_Dgram_Result_Impl. Definition at line 2145 of file POSIX_Asynch_IO.cpp. References ACE_Addr::get_size(), ACE_Addr::get_type(), remote_address_, and ACE_Addr::set_addr().
02146 {
02147 int retVal = -1; // failure
02148
02149 // make sure the addresses are of the same type
02150 if (addr.get_type () == this->remote_address_->get_type ())
02151 { // copy the remote_address_ into addr
02152 addr.set_addr (this->remote_address_->get_addr (),
02153 this->remote_address_->get_size ());
02154 retVal = 0; // success
02155 }
02156
02157 return retVal;
02158 }
|
|
|
Definition at line 2161 of file POSIX_Asynch_IO.cpp. References ACE_Addr::get_addr(), and remote_address_.
02162 {
02163 return (sockaddr *) this->remote_address_->get_addr ();
02164 }
|
|
|
Factory classes will have special permissions.
Definition at line 1234 of file POSIX_Asynch_IO.h. |
|
|
Proactor class has special permission.
Definition at line 1237 of file POSIX_Asynch_IO.h. |
|
|
Definition at line 1290 of file POSIX_Asynch_IO.h. |
|
|
Bytes requested when the asynchronous read was initiated.
Definition at line 1282 of file POSIX_Asynch_IO.h. |
|
|
The flags used in the read.
Definition at line 1293 of file POSIX_Asynch_IO.h. |
|
|
I/O handle used for reading.
Definition at line 1296 of file POSIX_Asynch_IO.h. |
|
|
Message block for reading the data into.
Definition at line 1285 of file POSIX_Asynch_IO.h. |
|
|
The address of where the packet came from.
Definition at line 1288 of file POSIX_Asynch_IO.h. Referenced by complete(), remote_address(), saddr(), and ~ACE_POSIX_Asynch_Read_Dgram_Result(). |
1.3.6